cartodb/db/migrate/20141202092936_create_likes.rb
2020-06-15 10:58:47 +08:00

19 lines
389 B
Ruby

Sequel.migration do
up do
SequelRails::connection.run 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp"'
SequelRails::connection.run %Q{
CREATE TABLE likes(
actor uuid NOT NULL,
subject uuid NOT NULL,
created_at timestamp without time zone DEFAULT now(),
PRIMARY KEY(actor, subject)
)
}
end
down do
drop_table :likes
end
end