relay/migrations/2020-03-14-213217_create_blocks/up.sql

12 lines
303 B
MySQL
Raw Normal View History

2020-03-15 02:05:40 +00:00
-- Your SQL goes here
CREATE TABLE blocks (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
2020-03-15 17:49:27 +00:00
domain_name TEXT UNIQUE NOT NULL,
2020-03-15 02:05:40 +00:00
created_at TIMESTAMP NOT NULL,
2020-03-15 22:37:53 +00:00
updated_at TIMESTAMP
2020-03-15 02:05:40 +00:00
);
2020-03-15 17:49:27 +00:00
CREATE INDEX blocks_domain_name_index ON blocks(domain_name);
2020-03-15 02:05:40 +00:00
SELECT diesel_manage_updated_at('blocks');