minecraft_manager/migrations/0001_initial.py

129 lines
26 KiB
Python
Raw Normal View History

2018-09-20 02:56:17 +00:00
# Generated by Django 2.0.5 on 2018-05-30 02:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Alert',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('message', models.TextField(max_length=1000)),
('seen', models.BooleanField(default=False)),
('date', models.DateTimeField(auto_now_add=True, null=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=20, unique=True, verbose_name='Minecraft Username')),
('age', models.PositiveSmallIntegerField()),
('player_type', models.TextField(max_length=300, verbose_name='What type of player are you?')),
('ever_banned', models.BooleanField(default=False, verbose_name='Have you ever been banned?')),
('ever_banned_explanation', models.TextField(blank=True, max_length=300, null=True, verbose_name='If you were previously banned, will you share why?')),
('reference', models.CharField(blank=True, max_length=50, null=True, verbose_name='Were you referred to our server?')),
('read_rules', models.CharField(max_length=10, verbose_name='Have you read the rules?')),
('accepted', models.NullBooleanField()),
('date', models.DateTimeField(auto_now_add=True, null=True)),
],
),
migrations.CreateModel(
name='IP',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ip', models.CharField(max_length=30)),
],
options={
'verbose_name': 'IP',
'verbose_name_plural': 'IPs',
},
),
migrations.CreateModel(
name='Note',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ref_table', models.CharField(choices=[('PL', 'Player'), ('TI', 'Ticket'), ('WA', 'Warning')], max_length=2)),
('ref_id', models.CharField(max_length=4)),
('message', models.TextField(max_length=1000)),
('last_update', models.DateTimeField(auto_now_add=True, null=True)),
('date', models.DateTimeField(auto_now_add=True, null=True)),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Player',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.CharField(max_length=36, unique=True)),
('username', models.CharField(max_length=20)),
('rank', models.CharField(choices=[('GU', 'Guest'), ('ME', 'Member'), ('DO', 'Donor'), ('JM', 'J-Mod'), ('MO', 'Mod'), ('SM', 'S-Mod'), ('AD', 'Admin')], default='GU', max_length=10)),
('first_seen', models.DateField(blank=True, null=True)),
('last_seen', models.DateField(blank=True, null=True)),
('application', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='minecraft_manager.Application')),
('auth_user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Ticket',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('message', models.CharField(max_length=500)),
('priority', models.CharField(blank=True, choices=[('L', 'Low'), ('M', 'Medium'), ('H', 'High')], max_length=1)),
('type', models.CharField(blank=True, choices=[('I', 'In-Game'), ('S', 'Server'), ('D', 'Discord'), ('W', 'Web')], max_length=1)),
('resolved', models.BooleanField(default=False)),
('world', models.CharField(blank=True, choices=[('O', 'Overworld'), ('N', 'Nether'), ('E', 'The End')], max_length=1, null=True)),
('x', models.CharField(blank=True, max_length=20, null=True)),
('y', models.CharField(blank=True, max_length=20, null=True)),
('z', models.CharField(blank=True, max_length=20, null=True)),
('date', models.DateTimeField(auto_now_add=True, null=True)),
('player', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ticket_player', to='minecraft_manager.Player')),
('staff', models.ForeignKey(blank=True, limit_choices_to=models.Q(('rank', 'JM'), ('rank', 'MO'), ('rank', 'SM'), ('rank', 'AD'), _connector='OR'), null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ticket_staff', to='minecraft_manager.Player')),
],
),
migrations.CreateModel(
name='UserSettings',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('default_results', models.SmallIntegerField(choices=[(10, '10'), (25, '25'), (50, '50'), (100, '100'), (-1, 'All')], default=10, verbose_name='Default Results')),
('default_theme', models.CharField(choices=[('DE', 'Default'), ('DA', 'Dark'), ('SO', 'Solar'), ('SL', 'Slate')], default='DE', max_length=2, verbose_name='Theme')),
('default_timezone', models.CharField(choices=[('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson',
('search_player_ip', models.BooleanField(default=False, verbose_name='Include IP in Player search')),
('show_timestamp_chat', models.BooleanField(default=False, verbose_name='Show Timestamp By Chat')),
('last_ip', models.CharField(default='127.0.0.1', editable=False, max_length=30)),
('auth_user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'User Settings',
'verbose_name_plural': 'User Settings',
},
),
migrations.CreateModel(
name='Warning',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('message', models.CharField(max_length=200)),
('severity', models.CharField(choices=[('L', 'Low'), ('M', 'Medium'), ('H', 'High')], max_length=1)),
('date', models.DateTimeField(auto_now_add=True, null=True)),
('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='warning_player', to='minecraft_manager.Player')),
('staff', models.ForeignKey(blank=True, limit_choices_to=models.Q(('rank', 'JM'), ('rank', 'MO'), ('rank', 'SM'), ('rank', 'AD'), _connector='OR'), null=True, on_delete=django.db.models.deletion.CASCADE, related_name='warning_staff', to='minecraft_manager.Player')),
],
),
migrations.AddField(
model_name='ip',
name='player',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='minecraft_manager.Player'),
),
]