pull/1/head
parent 944d21f681
commit 5e039d6bf5

@ -10,63 +10,136 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
]
dependencies = []
operations = [
migrations.CreateModel(
name='Helper',
name="Helper",
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('phone', phonenumber_field.modelfields.PhoneNumberField(editable=False, max_length=128, region=None, unique=True)),
('name', models.CharField(max_length=200)),
('number_validated', models.BooleanField(default=False)),
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"phone",
phonenumber_field.modelfields.PhoneNumberField(
editable=False, max_length=128, region=None, unique=True
),
),
("name", models.CharField(max_length=200)),
("number_validated", models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='Room',
name="Room",
fields=[
('name', models.CharField(max_length=200, primary_key=True, serialize=False)),
('required_helpers', models.IntegerField()),
(
"name",
models.CharField(max_length=200, primary_key=True, serialize=False),
),
("required_helpers", models.IntegerField()),
],
),
migrations.CreateModel(
name='Shift',
name="Shift",
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('start_at', models.DateTimeField()),
('duration', models.DurationField()),
('deleted', models.BooleanField(default=False)),
('room', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='app.room')),
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("start_at", models.DateTimeField()),
("duration", models.DurationField()),
("deleted", models.BooleanField(default=False)),
(
"room",
models.ForeignKey(
on_delete=django.db.models.deletion.RESTRICT, to="app.room"
),
),
],
),
migrations.CreateModel(
name='Message',
name="Message",
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.CharField(max_length=160)),
('created_at', models.DateTimeField(auto_now_add=True)),
('to', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.helper')),
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("text", models.CharField(max_length=160)),
("created_at", models.DateTimeField(auto_now_add=True)),
(
"to",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="app.helper"
),
),
],
),
migrations.CreateModel(
name='LoginToken',
name="LoginToken",
fields=[
('id', models.CharField(default=shiftregister.app.models.gen_token, editable=False, max_length=20, primary_key=True, serialize=False)),
('sent_at', models.DateTimeField(auto_now_add=True)),
('helper', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.helper')),
(
"id",
models.CharField(
default=shiftregister.app.models.gen_token,
editable=False,
max_length=20,
primary_key=True,
serialize=False,
),
),
("sent_at", models.DateTimeField(auto_now_add=True)),
(
"helper",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="app.helper"
),
),
],
),
migrations.CreateModel(
name='ShiftRegistration',
name="ShiftRegistration",
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('reminder_sent', models.BooleanField(default=False)),
('helper', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.helper')),
('shift', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='app.shift')),
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("reminder_sent", models.BooleanField(default=False)),
(
"helper",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="app.helper"
),
),
(
"shift",
models.ForeignKey(
on_delete=django.db.models.deletion.RESTRICT, to="app.shift"
),
),
],
options={
'unique_together': {('shift', 'helper')},
"unique_together": {("shift", "helper")},
},
),
]

@ -9,24 +9,41 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('app', '0001_initial'),
("app", "0001_initial"),
]
operations = [
migrations.CreateModel(
name='Calendar',
name="Calendar",
fields=[
('url', models.URLField(primary_key=True, serialize=False)),
('has_errors', models.BooleanField(default=False, editable=False)),
("url", models.URLField(primary_key=True, serialize=False)),
("has_errors", models.BooleanField(default=False, editable=False)),
],
),
migrations.CreateModel(
name='Event',
name="Event",
fields=[
('shift_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, to='app.shift')),
('uuid', models.UUIDField(editable=False, primary_key=True, serialize=False)),
('calendar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='importer.calendar')),
(
"shift_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
to="app.shift",
),
),
(
"uuid",
models.UUIDField(editable=False, primary_key=True, serialize=False),
),
(
"calendar",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="importer.calendar",
),
),
],
bases=('app.shift',),
bases=("app.shift",),
),
]

Loading…
Cancel
Save