diff options
Diffstat (limited to 'apps/notes/migrations/0002_auto_20181204_0620.py')
-rw-r--r-- | apps/notes/migrations/0002_auto_20181204_0620.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/apps/notes/migrations/0002_auto_20181204_0620.py b/apps/notes/migrations/0002_auto_20181204_0620.py new file mode 100644 index 0000000..e7cb38d --- /dev/null +++ b/apps/notes/migrations/0002_auto_20181204_0620.py @@ -0,0 +1,42 @@ +# Generated by Django 2.1.2 on 2018-12-04 12:20 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('notes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Tag', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=40)), + ('slug', models.SlugField(blank=True)), + ('color_hex', models.CharField(max_length=6)), + ('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)), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='parent_tag', to='notes.Tag')), + ], + ), + migrations.AlterModelOptions( + name='note', + options={'ordering': ('-date_created', '-date_updated')}, + ), + migrations.AddField( + model_name='note', + name='tagstwo', + field=models.ManyToManyField(blank=True, to='notes.Tag'), + ), + migrations.AlterUniqueTogether( + name='tag', + unique_together={('owner', 'name')}, + ), + ] |