forked from lavina/lavina
Format
This commit is contained in:
parent
b122987a17
commit
d347af4bae
|
@ -1,4 +1,5 @@
|
|||
CREATE TABLE users (
|
||||
CREATE TABLE users
|
||||
(
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
name STRING UNIQUE NOT NULL
|
||||
);
|
||||
|
@ -18,7 +19,8 @@ CREATE TABLE rooms
|
|||
message_count INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
CREATE TABLE messages (
|
||||
CREATE TABLE messages
|
||||
(
|
||||
room_id INTEGER NOT NULL,
|
||||
id INTEGER NOT NULL, -- unique per room, sequential in one room
|
||||
content STRING NOT NULL,
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
ALTER TABLE messages ADD author_id INTEGER NULL REFERENCES users (id); -- noqa: PRS
|
||||
ALTER TABLE messages
|
||||
ADD author_id INTEGER NULL REFERENCES users (id);
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
-- Add migration script here
|
Loading…
Reference in New Issue