cat/resources/migrations/20190114224926-add-relation-request-table.up.sql

7 lines
No EOL
222 B
SQL

CREATE TABLE relation_requests
(id SERIAL PRIMARY KEY,
from_id INTEGER NOT NULL,
to_id INTEGER NOT NULL,
status STATUS NOT NULL,
FOREIGN KEY (from_id) REFERENCES users (id),
FOREIGN KEY (to_id) REFERENCES users (id));