Example #1
0
 def do_update(self, ids, context={}):
     print("update_db")
     update_db(custom=True)
     static.make_ui_params_db()
     return {
         "next": {
             "type": "url",
             "url": "/ui#name=gen_board",
         },
         "flash": "Database updated successfully",
     }
Example #2
0
 def do_update(self, ids, context={}):
     print("update_db")
     update_db(custom=True)
     static.make_ui_params_db()
     return {
         "next": {
             "type": "url",
             "url": "/ui#name=gen_board",
         },
         "flash": "Database updated successfully",
     }
Example #3
0
 def upgrade_db(self, context={}):
     data = context["data"]
     if data["super_password"] != config.get("super_password"):
         raise Exception("Invalid super admin password")
     dbname = data["dbname"]
     database.set_active_db(dbname)
     from_version = get_db_version()
     update_db(force=True)
     apply_migrations(from_version=from_version)
     return {
         "next": {
             "name": "manage_db"
         },
         "flash": "Database upgrade successfully",
     }
Example #4
0
 def upgrade_db(self, context={}):
     data = context["data"]
     if data["super_password"] != config.get("super_password"):
         raise Exception("Invalid super admin password")
     dbname = data["dbname"]
     database.set_active_db(dbname)
     from_version = get_db_version()
     update_db(force=True)
     apply_migrations(from_version=from_version)
     return {
         "next": {
             "name": "manage_db"
         },
         "flash": "Database upgrade successfully",
     }