mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
27 lines
831 B
Python
27 lines
831 B
Python
|
# Generated by database migrator
|
||
|
import peewee
|
||
|
|
||
|
|
||
|
def migrate(migrator, database, **kwargs):
|
||
|
migrator.drop_columns("webhooks", ["name", "method", "url", "event", "send_data"])
|
||
|
migrator.add_columns(
|
||
|
"webhooks",
|
||
|
server_id=peewee.IntegerField(null=True),
|
||
|
webhook_type=peewee.CharField(default="Custom"),
|
||
|
name=peewee.CharField(default="Custom Webhook", max_length=64),
|
||
|
url=peewee.CharField(default=""),
|
||
|
bot_name=peewee.CharField(default="Crafty Controller"),
|
||
|
trigger=peewee.CharField(default="server_start,server_stop"),
|
||
|
body=peewee.CharField(default=""),
|
||
|
enabled=peewee.BooleanField(default=True),
|
||
|
)
|
||
|
"""
|
||
|
Write your migrations here.
|
||
|
"""
|
||
|
|
||
|
|
||
|
def rollback(migrator, database, **kwargs):
|
||
|
"""
|
||
|
Write your rollback migrations here.
|
||
|
"""
|