diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-05-11 12:33:15 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-05-15 12:13:58 +0300 |
commit | 6c6d2bf047f8694e8b58db0feea6a3f320c372de (patch) | |
tree | 512fddc4462eeb820f2beb3f1fbad0b0e65b5b7e /db/post_migrate | |
parent | e261b4b8517ba6d5d5b082f1955836c945fd51fc (diff) |
Rename `build_events` columns to `job_events`
Diffstat (limited to 'db/post_migrate')
-rw-r--r-- | db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb | 18 | ||||
-rw-r--r-- | db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb b/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb new file mode 100644 index 00000000000..281be90163a --- /dev/null +++ b/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb @@ -0,0 +1,18 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class CleanupRenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + cleanup_concurrent_column_rename :web_hooks, :build_events, :job_events + end + + def down + rename_column_concurrently :web_hooks, :job_events, :build_events + end +end diff --git a/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb b/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb new file mode 100644 index 00000000000..5d26df5688f --- /dev/null +++ b/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb @@ -0,0 +1,18 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class CleanupRenameServicesBuildEventsToJobEvents < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + cleanup_concurrent_column_rename :services, :build_events, :job_events + end + + def down + rename_column_concurrently :services, :job_events, :build_events + end +end |