Initial commit for adding multiple server types

This commit is contained in:
Andrew 2022-01-31 20:50:25 -05:00
parent 3e822ea076
commit d592dcd422
2 changed files with 18 additions and 0 deletions

View File

@ -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"

View 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.
"""