Make CreateGeoNodeGroupLinks migration reversible

parent 69a35280
......@@ -5,7 +5,7 @@ class CreateGeoNodeGroupLinks < ActiveRecord::Migration
disable_ddl_transaction!
def change
def up
create_table :geo_node_group_links do |t|
t.references :geo_node, index: true, foreign_key: { on_delete: :cascade }, null: false
t.integer :group_id, index: true, null: false
......@@ -15,4 +15,10 @@ class CreateGeoNodeGroupLinks < ActiveRecord::Migration
add_concurrent_foreign_key :geo_node_group_links, :namespaces, column: :group_id, on_delete: :cascade
end
def down
remove_foreign_key :geo_node_group_links, column: :group_id
drop_table :geo_node_group_links
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment