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/20180308130229_add_missing_...

22 lines
702 B

# This migration does not include Carto::Db::MigrationHelper on purpose
# It creates index concurrently, and that needs to be done outside of a transaction
require 'carto/db/migration_helper'
include Carto::Db::MigrationHelper
migration(
Proc.new do
add_index :geocodings, [:user_id, :created_at]
add_index :layers_user_tables, [:layer_id]
add_index :layers_user_tables, [:user_table_id, :layer_id]
add_index :user_tables, [:user_id, :name]
end,
Proc.new do
drop_index :geocodings, [:user_id, :created_at]
drop_index :layers_user_tables, [:layer_id]
drop_index :layers_user_tables, [:user_table_id, :layer_id]
drop_index :user_tables, [:user_id, :name]
end
)