cat/resources/migrations/20190109005337-add-relation-table.up.sql

6 lines
189 B
MySQL
Raw Normal View History

2019-01-11 23:10:58 +01:00
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));