You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cartodb/db/migrate/20161202171602_drop_visuali...

21 lines
513 B

require 'carto/db/migration_helper'
include Carto::Db::MigrationHelper
migration(
Proc.new do
drop_column :visualizations, :state_id
end,
Proc.new do
alter_table :visualizations do
add_foreign_key :state_id, :states, type: 'uuid', null: true
end
# The following code should be executed to restore the index for state_id
# SequelRails.connection.run %{
# CREATE INDEX CONCURRENTLY "visualizations_state_id_index"
# ON "visualizations" ("state_id");
# }
end
)