This repository has been archived on 2022-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
webdev/api/posts/migrations/0001_initial.py

30 lines
947 B
Python
Raw Permalink Normal View History

2022-01-08 07:51:22 +01:00
# Generated by Django 4.0 on 2022-01-08 06:45
2022-01-08 00:12:34 +01:00
from django.db import migrations, models
2022-01-08 07:51:22 +01:00
import django.db.models.deletion
2022-01-08 00:12:34 +01:00
class Migration(migrations.Migration):
initial = True
dependencies = [
2022-01-08 07:51:22 +01:00
('auth', '0012_alter_user_first_name_max_length'),
2022-01-08 00:12:34 +01:00
]
operations = [
migrations.CreateModel(
name='Post',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2022-01-08 07:51:22 +01:00
('created', models.DateTimeField(auto_now_add=True)),
('title', models.CharField(blank=True, default='', max_length=100)),
('body', models.TextField(blank=True, default='')),
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to='auth.user')),
2022-01-08 00:12:34 +01:00
],
2022-01-08 07:51:22 +01:00
options={
'ordering': ['created'],
},
2022-01-08 00:12:34 +01:00
),
]