2021-08-24 21:07:00 +00:00
|
|
|
# Generated by database migrator
|
|
|
|
import peewee
|
|
|
|
|
2022-03-23 02:50:12 +00:00
|
|
|
|
2021-08-24 21:07:00 +00:00
|
|
|
def migrate(migrator, database, **kwargs):
|
2022-03-23 02:50:12 +00:00
|
|
|
migrator.add_columns(
|
|
|
|
"user_crafty", limit_user_creation=peewee.IntegerField(default=0)
|
|
|
|
)
|
|
|
|
migrator.add_columns(
|
|
|
|
"user_crafty", limit_role_creation=peewee.IntegerField(default=0)
|
|
|
|
)
|
|
|
|
migrator.add_columns("user_crafty", created_server=peewee.IntegerField(default=0))
|
|
|
|
migrator.add_columns("user_crafty", created_user=peewee.IntegerField(default=0))
|
|
|
|
migrator.add_columns("user_crafty", created_role=peewee.IntegerField(default=0))
|
2021-08-24 21:07:00 +00:00
|
|
|
"""
|
|
|
|
Write your migrations here.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def rollback(migrator, database, **kwargs):
|
2022-03-23 02:50:12 +00:00
|
|
|
migrator.drop_columns("user_crafty", ["limit_user_creation"])
|
|
|
|
migrator.drop_columns("user_crafty", ["limit_role_creation"])
|
|
|
|
migrator.drop_columns("user_crafty", ["created_server"])
|
|
|
|
migrator.drop_columns("user_crafty", ["created_user"])
|
|
|
|
migrator.drop_columns("user_crafty", ["created_role"])
|
2021-08-24 21:07:00 +00:00
|
|
|
"""
|
|
|
|
Write your rollback migrations here.
|
|
|
|
"""
|