2023-01-05 20:11:49 +01:00
|
|
|
-- +migrate up
|
|
|
|
CREATE TABLE messages (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
|
2023-01-06 07:46:21 +01:00
|
|
|
from_account_id INTEGER NOT NULL references accounts(id),
|
|
|
|
to_account_id INTEGER NOT NULL references accounts(id),
|
2023-01-05 20:11:49 +01:00
|
|
|
|
2023-01-05 20:39:24 +01:00
|
|
|
subject VARCHAR(35) NOT NULL,
|
|
|
|
body VARCHAR(200) NOT NULL,
|
2023-01-05 20:11:49 +01:00
|
|
|
|
|
|
|
created_at TEXT NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'now')),
|
|
|
|
read_at TEXT
|
|
|
|
);
|
|
|
|
|
|
|
|
-- +migrate down
|
|
|
|
DROP TABLE messages;
|