This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/migrations/031-reports.sql

21 lines
455 B
MySQL
Raw Normal View History

2021-07-24 10:18:39 -07:00
-- Up
CREATE TABLE reports (
id TEXT NOT NULL PRIMARY KEY,
userId TEXT NOT NULL,
reporterId TEXT NULL,
comment TEXT NOT NULL,
isAutomatic INTEGER,
isHandled INTEGER,
FOREIGN KEY(userId) REFERENCES users(id),
FOREIGN KEY(reporterId) REFERENCES users(id)
);
CREATE INDEX "reports_isAutomatic" ON "reports" ("isAutomatic");
CREATE INDEX "reports_isHandled" ON "reports" ("isHandled");
-- Down
DROP TABLE reports;