feat: revamp authentication -- remove twitch's tokens from our own wrapper token
This commit is contained in:
parent
3186afe96d
commit
50900986fa
31 changed files with 736 additions and 155 deletions
35
migrations/20241219191711_sentences.py
Normal file
35
migrations/20241219191711_sentences.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"""
|
||||
This module contains a Caribou migration.
|
||||
|
||||
Migration Name: sentences
|
||||
Migration Version: 20241219191711
|
||||
"""
|
||||
|
||||
|
||||
def upgrade(connection):
|
||||
# update table `sentences` to have a user_id row
|
||||
# which references users.id
|
||||
# and a channel VARCHAR(255) row
|
||||
|
||||
sql = """
|
||||
DROP TABLE IF EXISTS sentences;
|
||||
"""
|
||||
connection.execute(sql)
|
||||
connection.commit()
|
||||
sql = """
|
||||
CREATE TABLE sentences(
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
sentence VARCHAR(255) NOT NULL UNIQUE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
last_updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
user_id VARCHAR(255) NOT NULL,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id)
|
||||
);
|
||||
"""
|
||||
connection.execute(sql)
|
||||
connection.commit()
|
||||
|
||||
|
||||
def downgrade(connection):
|
||||
# add your downgrade step here
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue