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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
# Generated by Django 2.1.2 on 2019-05-02 14:30
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import taggit.managers
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateModel(
name='Annotation',
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)),
('highlight_text', models.TextField(blank=True)),
('body_text', models.TextField(blank=True)),
('body_html', models.TextField(blank=True)),
('body_qjson', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
('is_public', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='LuxTag',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100, unique=True, verbose_name='Name')),
('slug', models.SlugField(max_length=100, unique=True, verbose_name='Slug')),
('color_rgb', models.CharField(blank=True, max_length=20)),
],
options={
'verbose_name_plural': 'Tags',
'verbose_name': 'Tag',
},
),
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(blank=True)),
('body_html', models.TextField(blank=True)),
('body_qjson', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
('url', models.CharField(blank=True, max_length=250)),
('slug', models.SlugField(blank=True)),
('is_public', models.BooleanField(default=False)),
],
options={
'ordering': ('-date_created', '-date_updated'),
},
managers=[
('include_trash', django.db.models.manager.Manager()),
],
),
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)),
('color_rgb', models.CharField(blank=True, max_length=20)),
('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)),
],
options={
'ordering': ('name', 'date_created', 'date_updated'),
},
managers=[
('include_trash', django.db.models.manager.Manager()),
],
),
migrations.CreateModel(
name='TaggedNotes',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('object_id', models.IntegerField(db_index=True, verbose_name='Object id')),
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes_taggednotes_tagged_items', to='contenttypes.ContentType', verbose_name='Content type')),
('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notes_taggednotes_items', to='notes.LuxTag')),
],
options={
'abstract': False,
},
),
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='notes.TaggedNotes', to='notes.LuxTag', verbose_name='Tags'),
),
migrations.AddField(
model_name='annotation',
name='note',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='notes.Note'),
),
migrations.AddField(
model_name='annotation',
name='owner',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.AlterUniqueTogether(
name='notebook',
unique_together={('owner', 'name')},
),
migrations.AlterUniqueTogether(
name='note',
unique_together={('owner', 'slug')},
),
]
|