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