mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Fixing Bandaid Workaroud for Permissions Migration
This commit is contained in:
parent
910a789ad4
commit
e776afc6d2
@ -3,6 +3,7 @@ import peewee
|
|||||||
|
|
||||||
def migrate(migrator, database, **kwargs):
|
def migrate(migrator, database, **kwargs):
|
||||||
try:
|
try:
|
||||||
|
migrator.add_columns('user_servers', permissions=peewee.CharField(default="00000000")) # First argument can be model class OR table name
|
||||||
migrator.add_columns('role_servers', permissions=peewee.CharField(default="00000000")) # First argument can be model class OR table name
|
migrator.add_columns('role_servers', permissions=peewee.CharField(default="00000000")) # First argument can be model class OR table name
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Error in migrations:", e)
|
print("Error in migrations:", e)
|
||||||
@ -11,7 +12,6 @@ def migrate(migrator, database, **kwargs):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def rollback(migrator, database, **kwargs):
|
def rollback(migrator, database, **kwargs):
|
||||||
migrator.drop_columns('user_servers', ['permissions']) # First argument can be model class OR table name
|
migrator.drop_columns('user_servers', ['permissions']) # First argument can be model class OR table name
|
||||||
migrator.drop_columns('role_servers', ['permissions']) # First argument can be model class OR table name
|
migrator.drop_columns('role_servers', ['permissions']) # First argument can be model class OR table name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user