Track migrations

This commit is contained in:
Tanner Collin 2018-04-02 22:45:53 +00:00
parent a3654f61b9
commit a245a51724
2 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,104 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2018-04-02 22:42
from __future__ import unicode_literals
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Client',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('business_number', models.CharField(max_length=16)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Manage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
('note', models.CharField(blank=True, max_length=500)),
('approved', models.NullBooleanField()),
('deleted', models.BooleanField(default=False)),
('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='employees', to='api.Client')),
],
),
migrations.CreateModel(
name='Price',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
('amount', models.DecimalField(decimal_places=2, max_digits=8)),
('deleted', models.BooleanField(default=False)),
('management', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='prices', to='api.Manage')),
],
),
migrations.CreateModel(
name='Provider',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('sin', models.CharField(max_length=16)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Shift',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
('set_price', models.DecimalField(decimal_places=2, max_digits=8, null=True)),
('set_date', models.DateField()),
('set_start', models.DateTimeField()),
('set_end', models.DateTimeField()),
('actual_start', models.DateTimeField(null=True)),
('actual_end', models.DateTimeField(null=True)),
('description', models.CharField(max_length=100, null=True)),
('chart', models.TextField(max_length=1000, null=True)),
('deleted', models.BooleanField(default=False)),
('price', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Price')),
],
),
migrations.CreateModel(
name='UserInfo',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('phone_number', models.CharField(max_length=16, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\+?1?\\d{9,15}$')])),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='WorkType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
('color', models.CharField(max_length=16)),
('label', models.CharField(max_length=100)),
('deleted', models.BooleanField(default=False)),
('client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='work_types', to='api.Client')),
],
),
migrations.AddField(
model_name='price',
name='work_type',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.WorkType'),
),
migrations.AddField(
model_name='manage',
name='provider',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='employers', to='api.Provider'),
),
]

View File