Introduce migrations folder + improve README.md + add custom CDN for Material Icons

This commit is contained in:
Yusur 2022-11-10 16:37:30 +01:00
parent b09d32d5e8
commit e449e06b5d
5 changed files with 44 additions and 4 deletions

17
migrations/0_6to0_7.py Normal file
View file

@ -0,0 +1,17 @@
from playhouse.migrate import migrate, SqliteMigrator, MySQLMigrator
from peewee import MySQLDatabase, SqliteDatabase
from app import database
if type(database) == MySQLDatabase:
migrator = MySQLMigrator(database)
elif type(database) == SqliteDatabase:
migrator = SqliteMigrator(database)
else:
print("Unsupported database")
exit()
with database.atomic():
migrate(
)