2021-08-19 22:18:50 +00:00
|
|
|
# Generated by database migrator
|
|
|
|
import peewee
|
|
|
|
|
2022-03-23 02:50:12 +00:00
|
|
|
|
2021-08-19 22:18:50 +00:00
|
|
|
def migrate(migrator, database, **kwargs):
|
2022-03-23 02:50:12 +00:00
|
|
|
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
|
2021-08-19 22:18:50 +00:00
|
|
|
"""
|
|
|
|
Write your migrations here.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def rollback(migrator, database, **kwargs):
|
2022-03-23 02:50:12 +00:00
|
|
|
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
|
2021-08-19 22:18:50 +00:00
|
|
|
"""
|
|
|
|
Write your rollback migrations here.
|
|
|
|
"""
|