cartodb/db/migrate/20180227090612_add_rate_limit_ref_to_users.rb

20 lines
368 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
require 'carto/db/migration_helper'
include Carto::Db::MigrationHelper
migration(
Proc.new do
alter_table :users do
add_foreign_key :rate_limit_id,
:rate_limits,
type: 'uuid'
add_index :rate_limit_id
end
end,
Proc.new do
alter_table :users do
drop_column :rate_limit_id
end
end
)