diff options
Diffstat (limited to 'app/django_comments/migrations')
4 files changed, 115 insertions, 0 deletions
diff --git a/app/django_comments/migrations/0001_initial.py b/app/django_comments/migrations/0001_initial.py new file mode 100644 index 0000000..b0a39b5 --- /dev/null +++ b/app/django_comments/migrations/0001_initial.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('sites', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('contenttypes', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Comment', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('object_pk', models.TextField(verbose_name='object ID')), + ('user_name', models.CharField(max_length=50, verbose_name="user's name", blank=True)), + ('user_email', models.EmailField(max_length=75, verbose_name="user's email address", blank=True)), + ('user_url', models.URLField(verbose_name="user's URL", blank=True)), + ('comment', models.TextField(max_length=3000, verbose_name='comment')), + ('submit_date', models.DateTimeField(default=None, verbose_name='date/time submitted')), + ('ip_address', models.GenericIPAddressField( + unpack_ipv4=True, null=True, verbose_name='IP address', blank=True)), + ('is_public', models.BooleanField(default=True, + help_text='Uncheck this box to make the comment effectively disappear from the site.', + verbose_name='is public')), + ('is_removed', models.BooleanField(default=False, + help_text='Check this box if the comment is inappropriate. A "This comment has been removed"' + ' message will be displayed instead.', + verbose_name='is removed')), + ('content_type', models.ForeignKey(related_name='content_type_set_for_comment', + verbose_name='content type', to='contenttypes.ContentType', + on_delete=models.CASCADE)), + ('site', models.ForeignKey(to='sites.Site', on_delete=models.CASCADE)), + ('user', models.ForeignKey(related_name='comment_comments', verbose_name='user', + blank=True, to=settings.AUTH_USER_MODEL, null=True, on_delete=models.SET_NULL)), + ], + options={ + 'ordering': ('submit_date',), + 'db_table': 'django_comments', + 'verbose_name': 'comment', + 'verbose_name_plural': 'comments', + 'permissions': [('can_moderate', 'Can moderate comments')], + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='CommentFlag', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('flag', models.CharField(max_length=30, verbose_name='flag', db_index=True)), + ('flag_date', models.DateTimeField(default=None, verbose_name='date')), + ('comment', models.ForeignKey(related_name='flags', verbose_name='comment', + to='django_comments.Comment', on_delete=models.CASCADE)), + ('user', models.ForeignKey(related_name='comment_flags', verbose_name='user', + to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)), + ], + options={ + 'db_table': 'django_comment_flags', + 'verbose_name': 'comment flag', + 'verbose_name_plural': 'comment flags', + }, + bases=(models.Model,), + ), + migrations.AlterUniqueTogether( + name='commentflag', + unique_together=set([('user', 'comment', 'flag')]), + ), + ] diff --git a/app/django_comments/migrations/0002_update_user_email_field_length.py b/app/django_comments/migrations/0002_update_user_email_field_length.py new file mode 100644 index 0000000..5e424e5 --- /dev/null +++ b/app/django_comments/migrations/0002_update_user_email_field_length.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_comments', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='comment', + name='user_email', + field=models.EmailField( + max_length=254, verbose_name="user's email address", + blank=True), + ), + ] diff --git a/app/django_comments/migrations/0003_add_submit_date_index.py b/app/django_comments/migrations/0003_add_submit_date_index.py new file mode 100644 index 0000000..4a5dadf --- /dev/null +++ b/app/django_comments/migrations/0003_add_submit_date_index.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_comments', '0002_update_user_email_field_length'), + ] + + operations = [ + migrations.AlterField( + model_name='comment', + name='submit_date', + field=models.DateTimeField(default=None, verbose_name='date/time submitted', db_index=True), + preserve_default=True, + ), + ] diff --git a/app/django_comments/migrations/__init__.py b/app/django_comments/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/django_comments/migrations/__init__.py |