debian-mirror-gitlab/db/post_migrate/20221114142616_drop_experiments_table.rb
2023-03-05 14:24:40 +05:30

21 lines
471 B
Ruby

# frozen_string_literal: true
class DropExperimentsTable < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
def up
drop_table :experiments, if_exists: true
end
def down
unless table_exists?(:experiments)
create_table :experiments do |t| # rubocop:disable Migration/SchemaAdditionMethodsNoPost
t.text :name, null: false
t.index :name, unique: true
end
end
add_text_limit :experiments, :name, 255
end
end