# 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')}, ), ]