Skip to content

Commit

Permalink
feat: update init_db
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuzi261 committed Oct 23, 2023
1 parent ea4aa9a commit da41f47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db_function/init_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def init_db():
cursor.executescript("""
CREATE TABLE IF NOT EXISTS user (id TEXT PRIMARY KEY, username TEXT, lastest_tweet TEXT);
CREATE TABLE IF NOT EXISTS channel (id TEXT PRIMARY KEY);
CREATE TABLE IF NOT EXISTS notification (user_id TEXT, channel_id TEXT, role_id TEXT, FOREIGN KEY (user_id) REFERENCES user (id), FOREIGN KEY (channel_id) REFERENCES channel (id), PRIMARY KEY(user_id, channel_id));
CREATE TABLE IF NOT EXISTS notification (user_id TEXT, channel_id TEXT, role_id TEXT, enabled INTEGER DEFAULT 1, FOREIGN KEY (user_id) REFERENCES user (id), FOREIGN KEY (channel_id) REFERENCES channel (id), PRIMARY KEY(user_id, channel_id));
""")
conn.commit()
conn.close()

0 comments on commit da41f47

Please sign in to comment.