Add Media-Token beside access token
Media-Token can be used only to access the content, but unable to modify user data
This commit is contained in:
parent
0a71a6c840
commit
1f06c40c4c
31 changed files with 516 additions and 762 deletions
13
server/flask/application/backend/data/migration.py
Normal file
13
server/flask/application/backend/data/migration.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import sqlite3
|
||||
import sys
|
||||
|
||||
def migration_0_to_1(db_path: str):
|
||||
db = sqlite3.connect(db_path, detect_types=sqlite3.PARSE_DECLTYPES)
|
||||
db_cursor = db.cursor()
|
||||
db_cursor.execute("ALTER TABLE session ADD media_token TEXT NOT NULL;")
|
||||
db.commit()
|
||||
db.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(sys.argv[1])
|
||||
#migration_0_to_1(sys.argv[1])
|
||||
Loading…
Add table
Add a link
Reference in a new issue