Geoffrey-Django/GeoffreyApp/migrations/0001_initial.py

140 lines
6.2 KiB
Python

# Generated by Django 2.1.2 on 2019-05-12 16:15
import GeoffreyApp.util
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='APIToken',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('key', models.CharField(default=GeoffreyApp.util.create_token, max_length=25, unique=True)),
('name', models.CharField(blank=True, max_length=50)),
('commands_perm', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='ItemListing',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('item_name', models.CharField(max_length=128)),
('price', models.IntegerField()),
('amount', models.IntegerField()),
('date_restocked', models.DateTimeField(auto_now=True)),
],
),
migrations.CreateModel(
name='Location',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, unique=True)),
('x_coord', models.IntegerField()),
('z_coord', models.IntegerField()),
('dimension', models.CharField(choices=[('O', 'Overworld'), ('N', 'Nether'), ('E', 'The End')], max_length=1)),
],
),
migrations.CreateModel(
name='Player',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=30, unique=True)),
('mc_uuid', models.CharField(max_length=36, unique=True)),
('discord_uuid', models.CharField(max_length=50, unique=True)),
],
),
migrations.CreateModel(
name='Resource',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('resource_name', models.CharField(max_length=128)),
],
),
migrations.CreateModel(
name='Tunnel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('tunnel_number', models.IntegerField()),
('tunnel_direction', models.CharField(choices=[('N', 'North'), ('E', 'East'), ('S', 'South'), ('W', 'West')], max_length=1)),
],
),
migrations.CreateModel(
name='Attraction',
fields=[
('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='GeoffreyApp.Location')),
],
bases=('GeoffreyApp.location',),
),
migrations.CreateModel(
name='Base',
fields=[
('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='GeoffreyApp.Location')),
],
bases=('GeoffreyApp.location',),
),
migrations.CreateModel(
name='Market',
fields=[
('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='GeoffreyApp.Location')),
],
bases=('GeoffreyApp.location',),
),
migrations.CreateModel(
name='PointOfInterest',
fields=[
('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='GeoffreyApp.Location')),
],
bases=('GeoffreyApp.location',),
),
migrations.CreateModel(
name='PublicFarm',
fields=[
('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='GeoffreyApp.Location')),
],
bases=('GeoffreyApp.location',),
),
migrations.CreateModel(
name='Shop',
fields=[
('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='GeoffreyApp.Location')),
],
bases=('GeoffreyApp.location',),
),
migrations.CreateModel(
name='Town',
fields=[
('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='GeoffreyApp.Location')),
('residents', models.ManyToManyField(to='GeoffreyApp.Player')),
],
bases=('GeoffreyApp.location',),
),
migrations.AddField(
model_name='tunnel',
name='location',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tunnel_location', to='GeoffreyApp.Location'),
),
migrations.AddField(
model_name='location',
name='owner',
field=models.ManyToManyField(to='GeoffreyApp.Player'),
),
migrations.AddField(
model_name='resource',
name='farm',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource', to='GeoffreyApp.PublicFarm'),
),
migrations.AddField(
model_name='itemlisting',
name='shop',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shop_selling', to='GeoffreyApp.Shop'),
),
]