Created
September 9, 2019 02:42
-
-
Save notgull/e9ae950ede64de1d816306569c89ef53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const thread_table_sql = "CREATE TABLE IF NOT EXISTS Threads (" + | |
"thread_id TEXT PRIMARY KEY," + | |
"author INTEGER REFERENCES Users(user_id)," + | |
"board string REFERENCES Boards(board_id)," + | |
"name TEXT NOT NULL," + | |
"description TEXT NOT NULL," + | |
"created_at TIMESTAMP NOT NULL" + | |
");"; | |
const post_table_sql = "CREATE TABLE IF NOT EXISTS Posts (" + | |
"post_id TEXT PRIMARY KEY," + | |
"author INTEGER REFERENCES Users(user_id)," + | |
"thread TEXT REFERENCES Threads(thread_id)," + | |
"title TEXT," + | |
"content TEXT," + | |
"reply_to string REFERENCES Posts(post_id)," + | |
"created_at TIMESTAMP NOT NULL" + | |
");"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment