2021-08-22 09:57:02 +00:00
|
|
|
# Generated by database migrator
|
|
|
|
from peewee import *
|
2021-09-08 22:01:10 +00:00
|
|
|
from app.classes.models.users import Users
|
2021-08-22 09:57:02 +00:00
|
|
|
|
2022-03-23 02:50:12 +00:00
|
|
|
|
2021-08-22 09:57:02 +00:00
|
|
|
def migrate(migrator, database, **kwargs):
|
|
|
|
db = database
|
2022-03-23 02:50:12 +00:00
|
|
|
|
2021-08-22 09:57:02 +00:00
|
|
|
class User_Crafty(Model):
|
2022-03-23 02:50:12 +00:00
|
|
|
user_id = ForeignKeyField(Users, backref="users_crafty")
|
2021-08-22 09:57:02 +00:00
|
|
|
permissions = CharField(default="00000000")
|
|
|
|
limit_server_creation = IntegerField(default=-1)
|
|
|
|
|
|
|
|
class Meta:
|
2022-03-23 02:50:12 +00:00
|
|
|
table_name = "user_crafty"
|
2021-08-22 09:57:02 +00:00
|
|
|
database = db
|
2022-03-23 02:50:12 +00:00
|
|
|
|
2021-08-22 09:57:02 +00:00
|
|
|
migrator.create_table(User_Crafty)
|
|
|
|
"""
|
|
|
|
Write your migrations here.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
2022-03-23 02:50:12 +00:00
|
|
|
def rollback(migrator, database, **kwargs):
|
|
|
|
migrator.drop_table("user_crafty") # Can be model class OR table name
|
2021-08-22 09:57:02 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
Write your rollback migrations here.
|
|
|
|
"""
|