cartodb/db/migrate/20160309173100_analysis_params_to_analysis.rb
2020-06-15 10:58:47 +08:00

16 lines
391 B
Ruby

Sequel.migration do
up do
rename_column :analyses, :params, :analysis_definition
SequelRails.connection.run(%{
alter index analysis_params_id rename to analyses_analisis_id
})
end
down do
rename_column :analyses, :analysis_definition, :params
SequelRails.connection.run(%{
alter index analyses_analisis_id rename to analysis_params_id
})
end
end