diff options
Diffstat (limited to 'db/migrate/20210729081351_create_topics.rb')
-rw-r--r-- | db/migrate/20210729081351_create_topics.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20210729081351_create_topics.rb b/db/migrate/20210729081351_create_topics.rb index c6fdc6bb98a..13ed2dc7ccc 100644 --- a/db/migrate/20210729081351_create_topics.rb +++ b/db/migrate/20210729081351_create_topics.rb @@ -3,7 +3,7 @@ class CreateTopics < ActiveRecord::Migration[6.1] include Gitlab::Database::MigrationHelpers - def change + def up create_table_with_constraints :topics do |t| t.text :name, null: false t.text_limit :name, 255 @@ -13,4 +13,10 @@ class CreateTopics < ActiveRecord::Migration[6.1] t.timestamps_with_timezone end end + + def down + with_lock_retries do + drop_table :topics + end + end end |