mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Initial commit for adding multiple server types
This commit is contained in:
parent
3e822ea076
commit
d592dcd422
@ -1,3 +1,4 @@
|
||||
from email.policy import default
|
||||
import sys
|
||||
import logging
|
||||
import datetime
|
||||
@ -43,6 +44,7 @@ class Servers(Model):
|
||||
server_ip = CharField(default="127.0.0.1")
|
||||
server_port = IntegerField(default=25565)
|
||||
logs_delete_after = IntegerField(default=0)
|
||||
type = CharField(default="minecraft-java")
|
||||
|
||||
class Meta:
|
||||
table_name = "servers"
|
||||
|
16
app/migrations/20210915205501_server_type.py
Normal file
16
app/migrations/20210915205501_server_type.py
Normal file
@ -0,0 +1,16 @@
|
||||
# Generated by database migrator
|
||||
import peewee
|
||||
|
||||
def migrate(migrator, database, **kwargs):
|
||||
migrator.add_columns('servers', type=peewee.CharField(default="minecraft-java"))
|
||||
"""
|
||||
Write your migrations here.
|
||||
"""
|
||||
|
||||
|
||||
|
||||
def rollback(migrator, database, **kwargs):
|
||||
migrator.drop_columns('servers', ['type'])
|
||||
"""
|
||||
Write your rollback migrations here.
|
||||
"""
|
Loading…
x
Reference in New Issue
Block a user