Skip to content

Commit

Permalink
add: fresh migration
Browse files Browse the repository at this point in the history
  • Loading branch information
devmahmud committed Jan 29, 2021
1 parent 2653da6 commit f36a0e9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 130 deletions.
35 changes: 30 additions & 5 deletions polls/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
# Generated by Django 2.1.5 on 2019-01-16 16:59
# Generated by Django 2.1 on 2021-01-29 16:14

import datetime
from django.conf import settings
from django.db import migrations, models
from django.utils.timezone import utc
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='Choice',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('choice_text', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name='Poll',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.CharField(max_length=255)),
('pub_date', models.DateTimeField(default=datetime.datetime(2019, 1, 16, 16, 59, 36, 459183, tzinfo=utc))),
('text', models.TextField()),
('pub_date', models.DateTimeField(default=django.utils.timezone.now)),
('active', models.BooleanField(default=True)),
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Vote',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('choice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='polls.Choice')),
('poll', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='polls.Poll')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='choice',
name='poll',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='polls.Poll'),
),
]
33 changes: 0 additions & 33 deletions polls/migrations/0002_auto_20190117_0119.py

This file was deleted.

27 changes: 0 additions & 27 deletions polls/migrations/0003_auto_20190117_2358.py

This file was deleted.

22 changes: 0 additions & 22 deletions polls/migrations/0004_poll_owner.py

This file was deleted.

25 changes: 0 additions & 25 deletions polls/migrations/0005_vote.py

This file was deleted.

18 changes: 0 additions & 18 deletions polls/migrations/0006_poll_active.py

This file was deleted.

0 comments on commit f36a0e9

Please sign in to comment.