# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-08-02 05:53
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import lib.fields


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('operations', '0018_auto_20180719_0756'),
        ('fleet_management', '0071_auto_20180801_1245'),
    ]

    operations = [
        migrations.CreateModel(
            name='FuelCardDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('changed_at', models.DateTimeField(auto_now=True, null=True)),
                ('deleted', models.BooleanField(db_index=True, default=False)),
                ('created_by', lib.fields.ProtectedForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='created_fuel_card_documents', to=settings.AUTH_USER_MODEL)),
                ('document', lib.fields.ProtectedForeignKey(on_delete=django.db.models.deletion.PROTECT, to='operations.Document')),
            ],
            options={
                'default_permissions': [],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FuelCardDocumentUploads',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('changed_at', models.DateTimeField(auto_now=True, null=True)),
                ('deleted', models.BooleanField(db_index=True, default=False)),
                ('description', models.CharField(max_length=255)),
            ],
            options={
                'default_permissions': [],
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='fuelcarddocument',
            name='document_type',
            field=models.ManyToManyField(to='fleet_management.FuelCardDocumentUploads', verbose_name=b'Document Type'),
        ),
        migrations.AddField(
            model_name='fuelcarddocument',
            name='fuel_card',
            field=lib.fields.ProtectedForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='fuel_card_documents', to='fleet_management.FuelCard'),
        ),
        migrations.AddField(
            model_name='fuelcarddocument',
            name='modified_by',
            field=lib.fields.ProtectedForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='modified_fuel_card_documents', to=settings.AUTH_USER_MODEL),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-08-02 05:53
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import lib.fields


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('operations', '0018_auto_20180719_0756'),
        ('fleet_management', '0071_auto_20180801_1245'),
    ]

    operations = [
        migrations.CreateModel(
            name='FuelCardDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('changed_at', models.DateTimeField(auto_now=True, null=True)),
                ('deleted', models.BooleanField(db_index=True, default=False)),
                ('created_by', lib.fields.ProtectedForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='created_fuel_card_documents', to=settings.AUTH_USER_MODEL)),
                ('document', lib.fields.ProtectedForeignKey(on_delete=django.db.models.deletion.PROTECT, to='operations.Document')),
            ],
            options={
                'default_permissions': [],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FuelCardDocumentUploads',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
                ('changed_at', models.DateTimeField(auto_now=True, null=True)),
                ('deleted', models.BooleanField(db_index=True, default=False)),
                ('description', models.CharField(max_length=255)),
            ],
            options={
                'default_permissions': [],
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='fuelcarddocument',
            name='document_type',
            field=models.ManyToManyField(to='fleet_management.FuelCardDocumentUploads', verbose_name=b'Document Type'),
        ),
        migrations.AddField(
            model_name='fuelcarddocument',
            name='fuel_card',
            field=lib.fields.ProtectedForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='fuel_card_documents', to='fleet_management.FuelCard'),
        ),
        migrations.AddField(
            model_name='fuelcarddocument',
            name='modified_by',
            field=lib.fields.ProtectedForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='modified_fuel_card_documents', to=settings.AUTH_USER_MODEL),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-08-02 05:53