diff options
author | Jonas Genannt <genannt@debian.org> | 2015-11-15 22:26:06 +0100 |
---|---|---|
committer | Jonas Genannt <genannt@debian.org> | 2015-11-15 22:26:06 +0100 |
commit | d65aa3c3c146b12548a54c894060bce9a8715ad2 (patch) | |
tree | 293607c424ec0b1d41e2aefaf26989a7adbd3e04 /tagging/migrations | |
parent | 29425a36c920e9b54e5860429ef3e3ce639fb155 (diff) | |
download | python-django-tagging-d65aa3c3c146b12548a54c894060bce9a8715ad2.tar python-django-tagging-d65aa3c3c146b12548a54c894060bce9a8715ad2.tar.gz |
Imported Upstream version 0.4upstream/0.4
Diffstat (limited to 'tagging/migrations')
-rw-r--r-- | tagging/migrations/0001_initial.py | 52 | ||||
-rw-r--r-- | tagging/migrations/__init__.py | 3 |
2 files changed, 55 insertions, 0 deletions
diff --git a/tagging/migrations/0001_initial.py b/tagging/migrations/0001_initial.py new file mode 100644 index 0000000..d784916 --- /dev/null +++ b/tagging/migrations/0001_initial.py @@ -0,0 +1,52 @@ +from django.db import models +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Tag', + fields=[ + ('id', models.AutoField( + verbose_name='ID', serialize=False, + auto_created=True, primary_key=True)), + ('name', models.CharField( + unique=True, max_length=50, + verbose_name='name', db_index=True)), + ], + options={ + 'ordering': ('name',), + 'verbose_name': 'tag', + 'verbose_name_plural': 'tags', + }, + ), + migrations.CreateModel( + name='TaggedItem', + fields=[ + ('id', models.AutoField( + verbose_name='ID', serialize=False, + auto_created=True, primary_key=True)), + ('object_id', models.PositiveIntegerField( + verbose_name='object id', db_index=True)), + ('content_type', models.ForeignKey( + verbose_name='content type', + to='contenttypes.ContentType')), + ('tag', models.ForeignKey( + related_name='items', verbose_name='tag', + to='tagging.Tag')), + ], + options={ + 'verbose_name': 'tagged item', + 'verbose_name_plural': 'tagged items', + }, + ), + migrations.AlterUniqueTogether( + name='taggeditem', + unique_together=set([('tag', 'content_type', 'object_id')]), + ), + ] diff --git a/tagging/migrations/__init__.py b/tagging/migrations/__init__.py new file mode 100644 index 0000000..805bae9 --- /dev/null +++ b/tagging/migrations/__init__.py @@ -0,0 +1,3 @@ +""" +Migrations for tagging. +""" |