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

9 lines
273 B
MySQL
Raw Permalink Normal View History

CREATE TABLE relation_requests
(id INT NOT NULL AUTO_INCREMENT,
from_id INT NOT NULL,
to_id INT NOT NULL,
status ENUM('open', 'accepted', 'declined') NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (from_id) REFERENCES users (id),
FOREIGN KEY (to_id) REFERENCES users (id));