pracowniapp2/przyrost/migrations/0001_initial.py

71 lines
2.6 KiB
Python
Raw Normal View History

2019-11-25 12:18:15 +01:00
# Generated by Django 2.2.7 on 2019-11-25 08:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Menu',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
),
migrations.CreateModel(
name='Post',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField()),
],
),
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=20)),
],
),
migrations.CreateModel(
name='StaticPage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('own_text', models.TextField()),
('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.Post')),
],
),
migrations.AddField(
model_name='post',
name='author',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.User'),
),
migrations.AddField(
model_name='post',
name='category',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.Category'),
),
migrations.CreateModel(
name='Comment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('unregistered_author', models.CharField(max_length=20)),
('text', models.TextField()),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.User')),
('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.Post')),
],
),
]