2018-05-15 16:20:45 -04:00
|
|
|
namespace :gitlab do
|
|
|
|
namespace :db do
|
2020-01-23 01:08:32 -05:00
|
|
|
desc 'GitLab | DB | Adds primary keys to tables that only have composite unique keys'
|
2018-05-15 16:20:45 -04:00
|
|
|
task composite_primary_keys_add: :environment do
|
|
|
|
require Rails.root.join('db/optional_migrations/composite_primary_keys')
|
|
|
|
CompositePrimaryKeysMigration.new.up
|
|
|
|
end
|
|
|
|
|
2020-01-23 01:08:32 -05:00
|
|
|
desc 'GitLab | DB | Removes previously added composite primary keys'
|
2018-05-15 16:20:45 -04:00
|
|
|
task composite_primary_keys_drop: :environment do
|
|
|
|
require Rails.root.join('db/optional_migrations/composite_primary_keys')
|
|
|
|
CompositePrimaryKeysMigration.new.down
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|