Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-28 01:40:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-28 01:40:43 +0300
commitbbe511b231b5de3fab4dc418601c89cc1ccc8063 (patch)
tree650453c3b64751df39fda6f33ca4b39318f41e0d /db
parentad1c34c03de42ebc5279f338f6304e77930d34d4 (diff)
Add latest changes from gitlab-org/gitlab@14-1-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210720083432_change_application_setting_terms_not_null.rb12
-rw-r--r--db/post_migrate/20210430121542_backfill_ci_build_trace_sections_for_bigint_conversion.rb3
-rw-r--r--db/post_migrate/20210722110515_revert_backfill_ci_build_trace_sections_for_bigint_conversion.rb16
-rw-r--r--db/schema_migrations/202107200834321
-rw-r--r--db/schema_migrations/202107221105151
-rw-r--r--db/structure.sql2
6 files changed, 33 insertions, 2 deletions
diff --git a/db/migrate/20210720083432_change_application_setting_terms_not_null.rb b/db/migrate/20210720083432_change_application_setting_terms_not_null.rb
new file mode 100644
index 00000000000..76dbbe68967
--- /dev/null
+++ b/db/migrate/20210720083432_change_application_setting_terms_not_null.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class ChangeApplicationSettingTermsNotNull < ActiveRecord::Migration[6.1]
+ def up
+ execute("UPDATE application_setting_terms SET terms = '' WHERE terms IS NULL")
+ change_column_null :application_setting_terms, :terms, false
+ end
+
+ def down
+ change_column_null :application_setting_terms, :terms, true
+ end
+end
diff --git a/db/post_migrate/20210430121542_backfill_ci_build_trace_sections_for_bigint_conversion.rb b/db/post_migrate/20210430121542_backfill_ci_build_trace_sections_for_bigint_conversion.rb
index f832b06d439..979ce5edfeb 100644
--- a/db/post_migrate/20210430121542_backfill_ci_build_trace_sections_for_bigint_conversion.rb
+++ b/db/post_migrate/20210430121542_backfill_ci_build_trace_sections_for_bigint_conversion.rb
@@ -7,7 +7,8 @@ class BackfillCiBuildTraceSectionsForBigintConversion < ActiveRecord::Migration[
COLUMN = :build_id
def up
- backfill_conversion_of_integer_to_bigint TABLE, COLUMN, batch_size: 15000, sub_batch_size: 100, primary_key: COLUMN
+ # No-op to disable the migration:
+ # backfill_conversion_of_integer_to_bigint TABLE, COLUMN, batch_size: 15000, sub_batch_size: 100, primary_key: COLUMN
end
def down
diff --git a/db/post_migrate/20210722110515_revert_backfill_ci_build_trace_sections_for_bigint_conversion.rb b/db/post_migrate/20210722110515_revert_backfill_ci_build_trace_sections_for_bigint_conversion.rb
new file mode 100644
index 00000000000..840540bb0d4
--- /dev/null
+++ b/db/post_migrate/20210722110515_revert_backfill_ci_build_trace_sections_for_bigint_conversion.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RevertBackfillCiBuildTraceSectionsForBigintConversion < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ TABLE = :ci_build_trace_sections
+ COLUMN = :build_id
+
+ def up
+ revert_backfill_conversion_of_integer_to_bigint TABLE, COLUMN, primary_key: COLUMN
+ end
+
+ def down
+ # no-op
+ end
+end
diff --git a/db/schema_migrations/20210720083432 b/db/schema_migrations/20210720083432
new file mode 100644
index 00000000000..44c8b4ae689
--- /dev/null
+++ b/db/schema_migrations/20210720083432
@@ -0,0 +1 @@
+6096780be4fae007485f150a019fc4555153e4b22b893d5fe29be36834d970a9 \ No newline at end of file
diff --git a/db/schema_migrations/20210722110515 b/db/schema_migrations/20210722110515
new file mode 100644
index 00000000000..1e4791fc2f9
--- /dev/null
+++ b/db/schema_migrations/20210722110515
@@ -0,0 +1 @@
+c9057cb28d2576551eafe78998023742018fa8351f2e550b7e35832a5509d21c \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index da2d4c50068..3a11a1fc7ab 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -9216,7 +9216,7 @@ ALTER SEQUENCE appearances_id_seq OWNED BY appearances.id;
CREATE TABLE application_setting_terms (
id integer NOT NULL,
cached_markdown_version integer,
- terms text,
+ terms text NOT NULL,
terms_html text
);