crafty-4/app/migrations/20210819155737_permissions.py
Andrew 24aec429cc Bandaid db error on migrations by comment.
Fix error in models where value was undefined
2021-08-22 17:29:52 -04:00

19 lines
744 B
Python

# Generated by database migrator
import peewee
def migrate(migrator, database, **kwargs):
migrator.drop_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
"""
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.
"""