2021-08-20 00:18:50 +02:00
|
|
|
# Generated by database migrator
|
|
|
|
import peewee
|
|
|
|
|
|
|
|
def migrate(migrator, database, **kwargs):
|
2021-08-22 18:05:04 -04:00
|
|
|
try:
|
|
|
|
migrator.add_columns('role_servers', permissions=peewee.CharField(default="00000000")) # First argument can be model class OR table name
|
|
|
|
except Exception as e:
|
|
|
|
print("Error in migrations:", e)
|
2021-08-20 00:18:50 +02:00
|
|
|
"""
|
|
|
|
Write your migrations here.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def rollback(migrator, database, **kwargs):
|
|
|
|
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
|
|
|
|
"""
|
|
|
|
Write your rollback migrations here.
|
|
|
|
"""
|