cartodb-4.42/db/migrate/20150812120815_add_visualization_id_to_synchronizations.rb

22 lines
453 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
Sequel.migration do
up do
alter_table :synchronizations do
add_column :visualization_id, 'uuid'
end
SequelRails.connection.run(%Q{
ALTER TABLE "synchronizations"
ADD CONSTRAINT visualization_id_fkey
FOREIGN KEY (visualization_id)
REFERENCES visualizations(id)
ON DELETE CASCADE
})
end
down do
alter_table :synchronizations do
drop_column :visualization_id
end
end
end