cartodb-4.42/db/migrate/20180227090612_add_rate_limit_ref_to_users.rb

20 lines
368 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +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
)