cartodb/db/migrate/20150812120815_add_visualization_id_to_synchronizations.rb

22 lines
453 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +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