diff options
Diffstat (limited to 'db/migrate')
6 files changed, 102 insertions, 0 deletions
diff --git a/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb b/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb new file mode 100644 index 00000000000..c0c58cfa3a7 --- /dev/null +++ b/db/migrate/20200203025400_default_lock_version_to_zero_for_merge_requests.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DefaultLockVersionToZeroForMergeRequests < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + with_lock_retries do + change_column_default :merge_requests, :lock_version, from: nil, to: 0 + end + end +end diff --git a/db/migrate/20200203025602_default_lock_version_to_zero_for_issues.rb b/db/migrate/20200203025602_default_lock_version_to_zero_for_issues.rb new file mode 100644 index 00000000000..72c265fdf38 --- /dev/null +++ b/db/migrate/20200203025602_default_lock_version_to_zero_for_issues.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DefaultLockVersionToZeroForIssues < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + with_lock_retries do + change_column_default :issues, :lock_version, from: nil, to: 0 + end + end +end diff --git a/db/migrate/20200203025619_default_lock_version_to_zero_for_epics.rb b/db/migrate/20200203025619_default_lock_version_to_zero_for_epics.rb new file mode 100644 index 00000000000..f44cfd07ee2 --- /dev/null +++ b/db/migrate/20200203025619_default_lock_version_to_zero_for_epics.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DefaultLockVersionToZeroForEpics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + with_lock_retries do + change_column_default :epics, :lock_version, from: nil, to: 0 + end + end +end diff --git a/db/migrate/20200203025744_default_lock_version_to_zero_for_ci_builds.rb b/db/migrate/20200203025744_default_lock_version_to_zero_for_ci_builds.rb new file mode 100644 index 00000000000..feda8c36947 --- /dev/null +++ b/db/migrate/20200203025744_default_lock_version_to_zero_for_ci_builds.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DefaultLockVersionToZeroForCiBuilds < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + with_lock_retries do + change_column_default :ci_builds, :lock_version, from: nil, to: 0 + end + end +end diff --git a/db/migrate/20200203025801_default_lock_version_to_zero_for_ci_stages.rb b/db/migrate/20200203025801_default_lock_version_to_zero_for_ci_stages.rb new file mode 100644 index 00000000000..b825c4ff1c4 --- /dev/null +++ b/db/migrate/20200203025801_default_lock_version_to_zero_for_ci_stages.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DefaultLockVersionToZeroForCiStages < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + with_lock_retries do + change_column_default :ci_stages, :lock_version, from: nil, to: 0 + end + end +end diff --git a/db/migrate/20200203025821_default_lock_version_to_zero_for_ci_pipelines.rb b/db/migrate/20200203025821_default_lock_version_to_zero_for_ci_pipelines.rb new file mode 100644 index 00000000000..6c4c84cb7e7 --- /dev/null +++ b/db/migrate/20200203025821_default_lock_version_to_zero_for_ci_pipelines.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class DefaultLockVersionToZeroForCiPipelines < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + with_lock_retries do + change_column_default :ci_pipelines, :lock_version, from: nil, to: 0 + end + end +end |