1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Generated by Django 2.1.2 on 2018-11-24 13:55
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('taggit', '0002_auto_20150616_2121'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Note',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('unique_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('date_created', models.DateTimeField(auto_now_add=True)),
('date_updated', models.DateTimeField(auto_now=True)),
('title', models.CharField(max_length=250)),
('body_text', models.TextField(null=True)),
('body_html', models.TextField(blank=True, null=True)),
('body_qjson', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
('url', models.CharField(blank=True, max_length=250, null=True)),
('slug', models.SlugField(blank=True)),
('is_public', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='Notebook',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('unique_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('name', models.CharField(max_length=250)),
('url', models.CharField(blank=True, max_length=250, null=True)),
('slug', models.SlugField(blank=True)),
('date_created', models.DateTimeField(auto_now_add=True)),
('date_updated', models.DateTimeField(auto_now=True)),
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='note',
name='notebook',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='notes.Notebook'),
),
migrations.AddField(
model_name='note',
name='owner',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='note',
name='tags',
field=taggit.managers.TaggableManager(blank=True, help_text='Tags', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags'),
),
migrations.AlterUniqueTogether(
name='notebook',
unique_together={('owner', 'slug')},
),
migrations.AlterUniqueTogether(
name='note',
unique_together={('owner', 'slug')},
),
]
|