rust_forum/migrations/20241204225143_create_post_table.up.sql
2024-12-19 03:36:16 +03:00

6 lines
No EOL
235 B
SQL

-- Add up migration script here
CREATE TABLE IF NOT EXISTS "post"(
creation_time TIMESTAMPTZ PRIMARY KEY UNIQUE NOT NULL DEFAULT NOW(),
user_id BIGSERIAL NOT NULL REFERENCES "user"(id),
post VARCHAR(8192) NOT NULL UNIQUE
);