rust_forum/migrations/20241204225143_create_post_table.up.sql

6 lines
217 B
MySQL
Raw Normal View History

2024-12-04 23:17:19 +03:00
-- Add up migration script here
2024-12-05 01:57:47 +03:00
CREATE TABLE IF NOT EXISTS "post"(
2024-12-04 23:17:19 +03:00
creation_time TIMESTAMPTZ PRIMARY KEY UNIQUE NOT NULL,
poster_id BIGSERIAL NOT NULL REFERENCES "user"(id),
post VARCHAR NOT NULL UNIQUE
);