2017-06-13 07:44:13 -04:00
|
|
|
# rubocop:disable Migration/Datetime
|
2017-04-05 18:53:57 -04:00
|
|
|
# rubocop:disable RemoveIndex
|
2016-05-28 22:54:17 -04:00
|
|
|
class AddDeletedAtToNamespaces < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-03-07 11:08:53 -05:00
|
|
|
def up
|
2016-05-28 22:54:17 -04:00
|
|
|
add_column :namespaces, :deleted_at, :datetime
|
2017-03-07 11:08:53 -05:00
|
|
|
|
2016-05-28 22:54:17 -04:00
|
|
|
add_concurrent_index :namespaces, :deleted_at
|
|
|
|
end
|
2017-03-07 11:08:53 -05:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :namespaces, :deleted_at if index_exists? :namespaces, :deleted_at
|
|
|
|
|
|
|
|
remove_column :namespaces, :deleted_at
|
|
|
|
end
|
2016-05-28 22:54:17 -04:00
|
|
|
end
|