cartodb-4.42/db/migrate/20180115110000_add_name_index_to_api_key.rb
2024-04-06 05:25:13 +00:00

19 lines
335 B
Ruby

require 'carto/db/migration_helper'
include Carto::Db::MigrationHelper
migration(
Proc.new do
alter_table :api_keys do
drop_index :user_id
add_index [:user_id, :name], unique: true
end
end,
Proc.new do
alter_table :api_keys do
drop_index [:user_id, :name]
add_index :user_id
end
end
)