]> git.p6c8.net - pcdenotes.git/blob - notes/migrations/0001_initial.py
Added "from-to" in copyright note
[pcdenotes.git] / notes / migrations / 0001_initial.py
1 # Generated by Django 3.2.11 on 2022-01-19 20:18
2
3 from django.conf import settings
4 from django.db import migrations, models
5 import django.db.models.deletion
6
7
8 class Migration(migrations.Migration):
9
10 initial = True
11
12 dependencies = [
13 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14 ]
15
16 operations = [
17 migrations.CreateModel(
18 name='Note',
19 fields=[
20 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21 ('title', models.CharField(max_length=250, unique=True)),
22 ('slug', models.SlugField(max_length=250, unique=True)),
23 ('content', models.TextField()),
24 ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)),
25 ('created_at', models.DateTimeField(auto_now_add=True)),
26 ('updated_at', models.DateTimeField(auto_now=True)),
27 ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes_posted', to=settings.AUTH_USER_MODEL)),
28 ],
29 options={
30 'ordering': ['-created_at'],
31 },
32 ),
33 ]

patrick-canterino.de