<filename>backend/massiliarp/migrations/0001_initial.py
# Generated by Django 3.2.7 on 2021-09-24 14:10

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CityPopulation',
            fields=[
                ('name', models.CharField(max_length=40, primary_key=True, serialize=False, verbose_name='City name')),
                ('population', models.PositiveIntegerField(verbose_name='Population')),
            ],
        ),
        migrations.CreateModel(
            name='MassiliaSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('turn', models.PositiveSmallIntegerField(verbose_name='Turn')),
                ('year', models.PositiveSmallIntegerField(verbose_name='Year')),
                ('taxation', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Taxation')),
                ('trade', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Trade')),
                ('polis_tributes', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Polis tributes')),
                ('miscellaneous', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Misc.')),
                ('garrison_upkeep', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Garrison upkeep')),
                ('balance', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='Balance')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProfitableBuilding',
            fields=[
                ('name', models.CharField(max_length=30, primary_key=True, serialize=False, verbose_name='Building name')),
                ('construction_cost', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Construction cost')),
                ('building_income', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Income')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='NavyUnit',
            fields=[
                ('name', models.CharField(max_length=25, primary_key=True, serialize=False, verbose_name='Building name')),
                ('recruitment_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Recruitment cost')),
                ('upkeep_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Unit upkeep')),
                ('units_recruited', models.PositiveIntegerField(verbose_name='Units recruited')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MaintainableBuilding',
            fields=[
                ('name', models.CharField(max_length=30, primary_key=True, serialize=False, verbose_name='Building name')),
                ('construction_cost', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Construction cost')),
                ('building_maintenance', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Maintenance expenses')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BalanceSheet',
            fields=[
                ('turn', models.PositiveSmallIntegerField(primary_key=True, serialize=False)),
                ('taxation', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Taxation')),
                ('trade', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Trade')),
                ('polis_tributes', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Polis tributes')),
                ('miscellaneous', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='Misc.')),
                ('army_upkeep', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Army upkeep')),
                ('navy_upkeep', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Navy upkeep')),
                ('garrison_upkeep', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Garrison upkeep')),
                ('infrastructure_maintenance', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Infrastructure maintenance')),
                ('total_income', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True, verbose_name='Total income')),
                ('total_expenses', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True, verbose_name='Total expenses')),
                ('new_balance', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True, verbose_name='New balance')),
                ('archived', models.BooleanField(default=False, verbose_name='Archived')),
                ('settings', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='massiliarp.massiliasettings')),
            ],
        ),
        migrations.CreateModel(
            name='ArmyUnit',
            fields=[
                ('name', models.CharField(max_length=25, primary_key=True, serialize=False, verbose_name='Building name')),
                ('recruitment_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Recruitment cost')),
                ('upkeep_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Unit upkeep')),
                ('units_recruited', models.PositiveIntegerField(verbose_name='Units recruited')),
                ('raised', models.BooleanField(default=False, verbose_name='Raised')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UniqueEvent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Event name')),
                ('event_type', models.CharField(choices=[('I', 'Income'), ('E', 'Expense')], max_length=1, verbose_name='Event type')),
                ('talents', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Talents')),
                ('turn', models.PositiveSmallIntegerField(verbose_name='Turn')),
                ('expired', models.BooleanField(default=False, verbose_name='Expired')),
                ('balance_sheet', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='massiliarp.balancesheet')),
            ],
            options={
                'unique_together': {('name', 'turn')},
            },
        ),
    ]

<filename>backend/massiliarp/migrations/0001_initial.py
# Generated by Django 3.2.7 on 2021-09-24 14:10

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CityPopulation',
            fields=[
                ('name', models.CharField(max_length=40, primary_key=True, serialize=False, verbose_name='City name')),
                ('population', models.PositiveIntegerField(verbose_name='Population')),
            ],
        ),
        migrations.CreateModel(
            name='MassiliaSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('turn', models.PositiveSmallIntegerField(verbose_name='Turn')),
                ('year', models.PositiveSmallIntegerField(verbose_name='Year')),
                ('taxation', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Taxation')),
                ('trade', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Trade')),
                ('polis_tributes', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Polis tributes')),
                ('miscellaneous', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Misc.')),
                ('garrison_upkeep', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Garrison upkeep')),
                ('balance', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='Balance')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ProfitableBuilding',
            fields=[
                ('name', models.CharField(max_length=30, primary_key=True, serialize=False, verbose_name='Building name')),
                ('construction_cost', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Construction cost')),
                ('building_income', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Income')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='NavyUnit',
            fields=[
                ('name', models.CharField(max_length=25, primary_key=True, serialize=False, verbose_name='Building name')),
                ('recruitment_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Recruitment cost')),
                ('upkeep_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Unit upkeep')),
                ('units_recruited', models.PositiveIntegerField(verbose_name='Units recruited')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MaintainableBuilding',
            fields=[
                ('name', models.CharField(max_length=30, primary_key=True, serialize=False, verbose_name='Building name')),
                ('construction_cost', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Construction cost')),
                ('building_maintenance', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Maintenance expenses')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BalanceSheet',
            fields=[
                ('turn', models.PositiveSmallIntegerField(primary_key=True, serialize=False)),
                ('taxation', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Taxation')),
                ('trade', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Trade')),
                ('polis_tributes', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Polis tributes')),
                ('miscellaneous', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='Misc.')),
                ('army_upkeep', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Army upkeep')),
                ('navy_upkeep', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Navy upkeep')),
                ('garrison_upkeep', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Garrison upkeep')),
                ('infrastructure_maintenance', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Infrastructure maintenance')),
                ('total_income', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True, verbose_name='Total income')),
                ('total_expenses', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True, verbose_name='Total expenses')),
                ('new_balance', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True, verbose_name='New balance')),
                ('archived', models.BooleanField(default=False, verbose_name='Archived')),
                ('settings', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='massiliarp.massiliasettings')),
            ],
        ),
        migrations.CreateModel(
            name='ArmyUnit',
            fields=[
                ('name', models.CharField(max_length=25, primary_key=True, serialize=False, verbose_name='Building name')),
                ('recruitment_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Recruitment cost')),
                ('upkeep_cost', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Unit upkeep')),
                ('units_recruited', models.PositiveIntegerField(verbose_name='Units recruited')),
                ('raised', models.BooleanField(default=False, verbose_name='Raised')),
                ('settings', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='massiliarp.massiliasettings')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UniqueEvent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Event name')),
                ('event_type', models.CharField(choices=[('I', 'Income'), ('E', 'Expense')], max_length=1, verbose_name='Event type')),
                ('talents', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Talents')),
                ('turn', models.PositiveSmallIntegerField(verbose_name='Turn')),
                ('expired', models.BooleanField(default=False, verbose_name='Expired')),
                ('balance_sheet', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='massiliarp.balancesheet')),
            ],
            options={
                'unique_together': {('name', 'turn')},
            },
        ),
    ]

# Generated by Django 3.2.7 on 2021-09-24 14:10