mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Added support for PWA
This commit is contained in:
@@ -21,7 +21,7 @@ from backend.custom_exceptions import (AccessUnauthorized, InvalidDatabaseFile,
|
||||
from backend.helpers import RestartVars, folder_path
|
||||
|
||||
DB_FILENAME = 'db', 'MIND.db'
|
||||
__DATABASE_VERSION__ = 9
|
||||
__DATABASE_VERSION__ = 10
|
||||
__DATEBASE_NAME_ORIGINAL__ = "MIND_original.db"
|
||||
|
||||
class DB_Singleton(type):
|
||||
@@ -283,6 +283,22 @@ def migrate_db(current_db_version: int) -> None:
|
||||
|
||||
current_db_version = 9
|
||||
|
||||
if current_db_version == 9:
|
||||
# V9 -> V10
|
||||
|
||||
# Nothing is changed in the database
|
||||
# It's just that this code needs to run once
|
||||
# and the DB migration system does exactly that:
|
||||
# run pieces of code once.
|
||||
from backend.settings import update_manifest
|
||||
|
||||
url_prefix: str = cursor.execute(
|
||||
"SELECT value FROM config WHERE key = 'url_prefix' LIMIT 1;"
|
||||
).fetchone()[0]
|
||||
update_manifest(url_prefix)
|
||||
|
||||
current_db_version = 10
|
||||
|
||||
return
|
||||
|
||||
def setup_db() -> None:
|
||||
|
||||
Reference in New Issue
Block a user