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/20140617121918_create_share...

22 lines
579 B

Sequel.migration do
up do
create_table :shared_entities do
primary_key :id
Uuid :user_id, null: false, :index => true
Uuid :entity_id, null: false
Text :type, null: false
DateTime :created_at, default: Sequel::CURRENT_TIMESTAMP
DateTime :updated_at, default: Sequel::CURRENT_TIMESTAMP
end
alter_table(:shared_entities) do
add_index [:user_id, :entity_id], :unique => true
end
end
down do
drop_table :shared_entities
end
end