cat/resources/migrations/20190109005337-add-relation-table.up.sql
2019-01-11 23:10:58 +01:00

6 lines
No EOL
189 B
SQL

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