~netlandish/django-wiki

6a9d88f09b08f82e0a65d2ae6a04cbd984644c73 — Gustavo Andres Morero 5 years ago 472fa9d
updating migrations. fix on urlpath method.
10 files changed, 137 insertions(+), 244 deletions(-)

M src/wiki/migrations/0001_initial.py
D src/wiki/migrations/0002_urlpath_moved_to.py
D src/wiki/migrations/0003_article_organization.py
M src/wiki/models/urlpath.py
M src/wiki/plugins/attachments/migrations/0001_initial.py
D src/wiki/plugins/attachments/migrations/0002_auto_20151118_1816.py
M src/wiki/plugins/images/migrations/0001_initial.py
D src/wiki/plugins/images/migrations/0002_auto_20151118_1811.py
M src/wiki/plugins/notifications/migrations/0001_initial.py
D src/wiki/plugins/notifications/migrations/0002_auto_20151118_1811.py
M src/wiki/migrations/0001_initial.py => src/wiki/migrations/0001_initial.py +91 -114
@@ 1,27 1,30 @@
import django.db.models.deletion
import mptt.fields
# Generated by Django 2.2.5 on 2019-10-09 21:12

from django.conf import settings
from django.db import migrations, models
from django.db.models.fields import GenericIPAddressField as IPAddressField
from wiki.conf.settings import GROUP_MODEL
import django.db.models.deletion
import mptt.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sites', '0001_initial'),
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contenttypes', '0001_initial'),
        ('auth', '0001_initial'),
        ('grinch', '0002_auto_20191010_0512'),
        ('sites', '0002_alter_domain_unique'),
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('created', models.DateTimeField(verbose_name='created', auto_now_add=True)),
                ('modified', models.DateTimeField(verbose_name='modified', auto_now=True, help_text='Article properties last modified')),
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', models.DateTimeField(auto_now=True, help_text='Article properties last modified', verbose_name='modified')),
                ('group_read', models.BooleanField(default=True, verbose_name='group read access')),
                ('group_write', models.BooleanField(default=True, verbose_name='group write access')),
                ('other_read', models.BooleanField(default=True, verbose_name='others read access')),


@@ 30,168 33,142 @@ class Migration(migrations.Migration):
            options={
                'permissions': (('moderate', 'Can edit all articles and lock/unlock/restore'), ('assign', 'Can change ownership of any article'), ('grant', 'Can assign permissions to other users')),
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ArticleForObject',
            name='ArticlePlugin',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField(verbose_name='object ID')),
                ('is_mptt', models.BooleanField(default=False, editable=False)),
                ('article', models.ForeignKey(to='wiki.Article', on_delete=models.CASCADE)),
                ('content_type', models.ForeignKey(related_name='content_type_set_for_articleforobject', verbose_name='content type', to='contenttypes.ContentType', on_delete=models.CASCADE)),
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wiki.Article', verbose_name='article')),
            ],
            options={
                'verbose_name_plural': 'Articles for object',
                'verbose_name': 'Article for object',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='ArticlePlugin',
            name='RevisionPlugin',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('articleplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wiki.ArticlePlugin')),
            ],
            options={
            },
            bases=(models.Model,),
            bases=('wiki.articleplugin',),
        ),
        migrations.CreateModel(
            name='ArticleRevision',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('revision_number', models.IntegerField(verbose_name='revision number', editable=False)),
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('revision_number', models.IntegerField(editable=False, verbose_name='revision number')),
                ('user_message', models.TextField(blank=True)),
                ('automatic_log', models.TextField(blank=True, editable=False)),
                ('ip_address', IPAddressField(null=True, verbose_name='IP address', blank=True, editable=False)),
                ('ip_address', models.GenericIPAddressField(blank=True, editable=False, null=True, verbose_name='IP address')),
                ('modified', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('deleted', models.BooleanField(default=False, verbose_name='deleted')),
                ('locked', models.BooleanField(default=False, verbose_name='locked')),
                ('content', models.TextField(blank=True, verbose_name='article contents')),
                ('title', models.CharField(max_length=512, verbose_name='article title', help_text='Each revision contains a title field that must be filled out, even if the title has not changed')),
                ('article', models.ForeignKey(to='wiki.Article', verbose_name='article', on_delete=models.CASCADE)),
                ('previous_revision', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wiki.ArticleRevision')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, verbose_name='user')),
                ('title', models.CharField(help_text='Each revision contains a title field that must be filled out, even if the title has not changed', max_length=512, verbose_name='article title')),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wiki.Article', verbose_name='article')),
                ('previous_revision', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.ArticleRevision')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
            options={
                'get_latest_by': 'revision_number',
                'ordering': ('created',),
                'get_latest_by': 'revision_number',
                'unique_together': {('article', 'revision_number')},
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='article',
            name='current_revision',
            field=models.OneToOneField(blank=True, help_text='The revision being displayed for this article. If you need to do a roll-back, simply change the value of this field.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='current_set', to='wiki.ArticleRevision', verbose_name='current revision'),
        ),
        migrations.AddField(
            model_name='article',
            name='group',
            field=models.ForeignKey(blank=True, help_text='Like in a UNIX file system, permissions can be given to a user according to group membership. Groups are handled through the Django auth system.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='auth.Group', verbose_name='group'),
        ),
        migrations.AddField(
            model_name='article',
            name='organization',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='articles', to='grinch.Organization'),
        ),
        migrations.AddField(
            model_name='article',
            name='owner',
            field=models.ForeignKey(blank=True, help_text='The owner of the article, usually the creator. The owner always has both read and write access.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='owned_articles', to=settings.AUTH_USER_MODEL, verbose_name='owner'),
        ),
        migrations.CreateModel(
            name='ReusablePlugin',
            name='URLPath',
            fields=[
                ('articleplugin_ptr', models.OneToOneField(primary_key=True, parent_link=True, to='wiki.ArticlePlugin', serialize=False, auto_created=True, on_delete=models.CASCADE)),
                ('articles', models.ManyToManyField(related_name='shared_plugins_set', to='wiki.Article')),
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(blank=True, null=True, verbose_name='slug')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('article', models.ForeignKey(help_text='This field is automatically updated, but you need to populate it when creating a new URL path.', on_delete=django.db.models.deletion.CASCADE, to='wiki.Article', verbose_name='article')),
                ('moved_to', mptt.fields.TreeForeignKey(blank=True, help_text='Article path was moved to this location', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='moved_from', to='wiki.URLPath', verbose_name='Moved to')),
                ('parent', mptt.fields.TreeForeignKey(blank=True, help_text='Position of URL path in the tree.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='wiki.URLPath')),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
            ],
            options={
                'verbose_name': 'URL path',
                'verbose_name_plural': 'URL paths',
                'unique_together': {('site', 'parent', 'slug')},
            },
            bases=('wiki.articleplugin',),
        ),
        migrations.CreateModel(
            name='RevisionPlugin',
            name='SimplePlugin',
            fields=[
                ('articleplugin_ptr', models.OneToOneField(primary_key=True, parent_link=True, to='wiki.ArticlePlugin', serialize=False, auto_created=True, on_delete=models.CASCADE)),
                ('articleplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wiki.ArticlePlugin')),
                ('article_revision', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wiki.ArticleRevision')),
            ],
            options={
            },
            bases=('wiki.articleplugin',),
        ),
        migrations.CreateModel(
            name='RevisionPluginRevision',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('revision_number', models.IntegerField(verbose_name='revision number', editable=False)),
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('revision_number', models.IntegerField(editable=False, verbose_name='revision number')),
                ('user_message', models.TextField(blank=True)),
                ('automatic_log', models.TextField(blank=True, editable=False)),
                ('ip_address', IPAddressField(null=True, verbose_name='IP address', blank=True, editable=False)),
                ('ip_address', models.GenericIPAddressField(blank=True, editable=False, null=True, verbose_name='IP address')),
                ('modified', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('deleted', models.BooleanField(default=False, verbose_name='deleted')),
                ('locked', models.BooleanField(default=False, verbose_name='locked')),
                ('plugin', models.ForeignKey(related_name='revision_set', to='wiki.RevisionPlugin', on_delete=models.CASCADE)),
                ('previous_revision', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wiki.RevisionPluginRevision')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, blank=True, to=settings.AUTH_USER_MODEL, verbose_name='user')),
                ('previous_revision', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.RevisionPluginRevision')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='user')),
                ('plugin', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='revision_set', to='wiki.RevisionPlugin')),
            ],
            options={
                'get_latest_by': 'revision_number',
                'ordering': ('-created',),
                'get_latest_by': 'revision_number',
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='revisionplugin',
            name='current_revision',
            field=models.OneToOneField(blank=True, help_text='The revision being displayed for this plugin. If you need to do a roll-back, simply change the value of this field.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='plugin_set', to='wiki.RevisionPluginRevision', verbose_name='current revision'),
        ),
        migrations.CreateModel(
            name='SimplePlugin',
            name='ReusablePlugin',
            fields=[
                ('articleplugin_ptr', models.OneToOneField(primary_key=True, parent_link=True, to='wiki.ArticlePlugin', serialize=False, auto_created=True, on_delete=models.CASCADE)),
                ('article_revision', models.ForeignKey(to='wiki.ArticleRevision', on_delete=models.CASCADE)),
                ('articleplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wiki.ArticlePlugin')),
                ('articles', models.ManyToManyField(related_name='shared_plugins_set', to='wiki.Article')),
            ],
            options={
            },
            bases=('wiki.articleplugin',),
        ),
        migrations.CreateModel(
            name='URLPath',
            name='ArticleForObject',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
                ('slug', models.SlugField(null=True, blank=True, verbose_name='slug')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                ('article', models.ForeignKey(help_text='This field is automatically updated, but you need to populate it when creating a new URL path.', on_delete=django.db.models.deletion.CASCADE, to='wiki.Article', verbose_name='article')),
                ('parent', mptt.fields.TreeForeignKey(blank=True, help_text='Position of URL path in the tree.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='wiki.URLPath')),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField(verbose_name='object ID')),
                ('is_mptt', models.BooleanField(default=False, editable=False)),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wiki.Article')),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='content_type_set_for_articleforobject', to='contenttypes.ContentType', verbose_name='content type')),
            ],
            options={
                'verbose_name_plural': 'URL paths',
                'verbose_name': 'URL path',
                'verbose_name': 'Article for object',
                'verbose_name_plural': 'Articles for object',
                'unique_together': {('content_type', 'object_id')},
            },
            bases=(models.Model,),
        ),
        migrations.AlterUniqueTogether(
            name='urlpath',
            unique_together=set([('site', 'parent', 'slug')]),
        ),
        migrations.AddField(
            model_name='revisionplugin',
            name='current_revision',
            field=models.OneToOneField(related_name='plugin_set', null=True, help_text='The revision being displayed for this plugin. If you need to do a roll-back, simply change the value of this field.', blank=True, to='wiki.RevisionPluginRevision', verbose_name='current revision', on_delete=models.CASCADE),
            preserve_default=True,
        ),
        migrations.AlterUniqueTogether(
            name='articlerevision',
            unique_together=set([('article', 'revision_number')]),
        ),
        migrations.AddField(
            model_name='articleplugin',
            name='article',
            field=models.ForeignKey(to='wiki.Article', verbose_name='article', on_delete=models.CASCADE),
            preserve_default=True,
        ),
        migrations.AlterUniqueTogether(
            name='articleforobject',
            unique_together=set([('content_type', 'object_id')]),
        ),
        migrations.AddField(
            model_name='article',
            name='current_revision',
            field=models.OneToOneField(related_name='current_set', null=True, help_text='The revision being displayed for this article. If you need to do a roll-back, simply change the value of this field.', blank=True, to='wiki.ArticleRevision', verbose_name='current revision', on_delete=models.CASCADE),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='article',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, help_text='Like in a UNIX file system, permissions can be given to a user according to group membership. Groups are handled through the Django auth system.', blank=True, to=GROUP_MODEL, verbose_name='group'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='article',
            name='owner',
            field=models.ForeignKey(related_name='owned_articles', null=True, on_delete=django.db.models.deletion.SET_NULL, help_text='The owner of the article, usually the creator. The owner always has both read and write access.', blank=True, to=settings.AUTH_USER_MODEL, verbose_name='owner'),
            preserve_default=True,
        ),
    ]

D src/wiki/migrations/0002_urlpath_moved_to.py => src/wiki/migrations/0002_urlpath_moved_to.py +0 -19
@@ 1,19 0,0 @@
# Generated by Django 1.10.7 on 2017-06-06 23:18
import django.db.models.deletion
import mptt.fields
from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('wiki', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='urlpath',
            name='moved_to',
            field=mptt.fields.TreeForeignKey(blank=True, help_text='Article path was moved to this location', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='moved_from', to='wiki.URLPath', verbose_name='Moved to'),
        ),
    ]

D src/wiki/migrations/0003_article_organization.py => src/wiki/migrations/0003_article_organization.py +0 -20
@@ 1,20 0,0 @@
# Generated by Django 2.2.5 on 2019-10-10 16:24

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('grinch', '0002_auto_20191010_0512'),
        ('wiki', '0002_urlpath_moved_to'),
    ]

    operations = [
        migrations.AddField(
            model_name='article',
            name='organization',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='articles', to='grinch.Organization'),
        ),
    ]

M src/wiki/models/urlpath.py => src/wiki/models/urlpath.py +1 -1
@@ 327,7 327,7 @@ class URLPath(MPTTModel):
        elif settings.LOG_IPS_ANONYMOUS:
            ip_address = request.META.get('REMOTE_ADDR', None)

        org = request.organization if not request.user.is_anonymous() else None
        org = request.organization if not request.user.is_anonymous else None
        return cls.create_urlpath(
            parent_urlpath,
            slug,

M src/wiki/plugins/attachments/migrations/0001_initial.py => src/wiki/plugins/attachments/migrations/0001_initial.py +22 -18
@@ 1,12 1,15 @@
import django.db.models.deletion
import wiki.plugins.attachments.models
# Generated by Django 2.2.5 on 2019-10-09 21:12

from django.conf import settings
from django.db import migrations, models
from django.db.models.fields import GenericIPAddressField as IPAddressField
import django.db.models.deletion
import wiki.plugins.attachments.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wiki', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),


@@ 16,45 19,46 @@ class Migration(migrations.Migration):
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('reusableplugin_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='wiki.ReusablePlugin', auto_created=True, on_delete=models.CASCADE)),
                ('original_filename', models.CharField(max_length=256, verbose_name='original filename', blank=True, null=True)),
                ('reusableplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wiki.ReusablePlugin')),
                ('original_filename', models.CharField(blank=True, max_length=256, null=True, verbose_name='original filename')),
            ],
            options={
                'verbose_name': 'attachment',
                'verbose_name_plural': 'attachments',
                'db_table': 'wiki_attachments_attachment',
            },
            bases=('wiki.reusableplugin',),
        ),
        migrations.CreateModel(
            name='AttachmentRevision',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)),
                ('revision_number', models.IntegerField(verbose_name='revision number', editable=False)),
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('revision_number', models.IntegerField(editable=False, verbose_name='revision number')),
                ('user_message', models.TextField(blank=True)),
                ('automatic_log', models.TextField(editable=False, blank=True)),
                ('ip_address', IPAddressField(editable=False, verbose_name='IP address', blank=True, null=True)),
                ('automatic_log', models.TextField(blank=True, editable=False)),
                ('ip_address', models.GenericIPAddressField(blank=True, editable=False, null=True, verbose_name='IP address')),
                ('modified', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('deleted', models.BooleanField(default=False, verbose_name='deleted')),
                ('locked', models.BooleanField(default=False, verbose_name='locked')),
                ('file', models.FileField(max_length=255, verbose_name='file', upload_to=wiki.plugins.attachments.models.upload_path)),
                ('file', models.FileField(max_length=255, upload_to=wiki.plugins.attachments.models.upload_path, verbose_name='file')),
                ('description', models.TextField(blank=True)),
                ('attachment', models.ForeignKey(to='wiki_attachments.Attachment', on_delete=models.CASCADE)),
                ('previous_revision', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki_attachments.AttachmentRevision', null=True)),
                ('user', models.ForeignKey(blank=True, verbose_name='user', on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, null=True)),
                ('attachment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wiki_attachments.Attachment')),
                ('previous_revision', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki_attachments.AttachmentRevision')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='user')),
            ],
            options={
                'ordering': ('created',),
                'get_latest_by': 'revision_number',
                'verbose_name': 'attachment revision',
                'verbose_name_plural': 'attachment revisions',
                'db_table': 'wiki_attachments_attachmentrevision',
                'ordering': ('created',),
                'get_latest_by': 'revision_number',
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='attachment',
            name='current_revision',
            field=models.OneToOneField(to='wiki_attachments.AttachmentRevision', blank=True, verbose_name='current revision', related_name='current_set', help_text='The revision of this attachment currently in use (on all articles using the attachment)', null=True, on_delete=models.CASCADE),
            preserve_default=True,
            field=models.OneToOneField(blank=True, help_text='The revision of this attachment currently in use (on all articles using the attachment)', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='current_set', to='wiki_attachments.AttachmentRevision', verbose_name='current revision'),
        ),
    ]


D src/wiki/plugins/attachments/migrations/0002_auto_20151118_1816.py => src/wiki/plugins/attachments/migrations/0002_auto_20151118_1816.py +0 -21
@@ 1,21 0,0 @@
from django.db import migrations, models


class Migration(migrations.Migration):

    atomic = False

    dependencies = [
        ('wiki_attachments', '0001_initial'),
    ]

    operations = [
        migrations.AlterModelTable(
            name='attachment',
            table='wiki_attachments_attachment',
        ),
        migrations.AlterModelTable(
            name='attachmentrevision',
            table='wiki_attachments_attachmentrevision',
        ),
    ]

M src/wiki/plugins/images/migrations/0001_initial.py => src/wiki/plugins/images/migrations/0001_initial.py +13 -6
@@ 1,9 1,14 @@
import wiki.plugins.images.models
# Generated by Django 2.2.5 on 2019-10-09 21:12

from django.db import migrations, models
import django.db.models.deletion
import wiki.plugins.images.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wiki', '0001_initial'),
    ]


@@ 12,25 17,27 @@ class Migration(migrations.Migration):
        migrations.CreateModel(
            name='Image',
            fields=[
                ('revisionplugin_ptr', models.OneToOneField(to='wiki.RevisionPlugin', primary_key=True, auto_created=True, parent_link=True, serialize=False, on_delete=models.CASCADE)),
                ('revisionplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wiki.RevisionPlugin')),
            ],
            options={
                'verbose_name': 'image',
                'verbose_name_plural': 'images',
                'db_table': 'wiki_images_image',
            },
            bases=('wiki.revisionplugin',),
        ),
        migrations.CreateModel(
            name='ImageRevision',
            fields=[
                ('revisionpluginrevision_ptr', models.OneToOneField(to='wiki.RevisionPluginRevision', primary_key=True, auto_created=True, parent_link=True, serialize=False, on_delete=models.CASCADE)),
                ('image', models.ImageField(null=True, blank=True, height_field='height', max_length=2000, width_field='width', upload_to=wiki.plugins.images.models.upload_path)),
                ('width', models.SmallIntegerField(null=True, blank=True)),
                ('height', models.SmallIntegerField(null=True, blank=True)),
                ('revisionpluginrevision_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wiki.RevisionPluginRevision')),
                ('image', models.ImageField(blank=True, height_field='height', max_length=2000, null=True, upload_to=wiki.plugins.images.models.upload_path, width_field='width')),
                ('width', models.SmallIntegerField(blank=True, null=True)),
                ('height', models.SmallIntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'image revision',
                'verbose_name_plural': 'image revisions',
                'db_table': 'wiki_images_imagerevision',
                'ordering': ('-created',),
            },
            bases=('wiki.revisionpluginrevision',),

D src/wiki/plugins/images/migrations/0002_auto_20151118_1811.py => src/wiki/plugins/images/migrations/0002_auto_20151118_1811.py +0 -21
@@ 1,21 0,0 @@
from django.db import migrations, models


class Migration(migrations.Migration):

    atomic = False

    dependencies = [
        ('wiki_images', '0001_initial'),
    ]

    operations = [
        migrations.AlterModelTable(
            name='image',
            table='wiki_images_image',
        ),
        migrations.AlterModelTable(
            name='imagerevision',
            table='wiki_images_imagerevision',
        ),
    ]

M src/wiki/plugins/notifications/migrations/0001_initial.py => src/wiki/plugins/notifications/migrations/0001_initial.py +10 -7
@@ 1,10 1,15 @@
# Generated by Django 2.2.5 on 2019-10-09 21:12

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('django_nyt', '0006_auto_20141229_1630'),
        ('django_nyt', '0008_auto_20161023_1641'),
        ('wiki', '0001_initial'),
    ]



@@ 12,15 17,13 @@ class Migration(migrations.Migration):
        migrations.CreateModel(
            name='ArticleSubscription',
            fields=[
                ('articleplugin_ptr', models.OneToOneField(auto_created=True, to='wiki.ArticlePlugin', primary_key=True, parent_link=True, serialize=False, on_delete=models.CASCADE)),
                ('subscription', models.OneToOneField(to='django_nyt.Subscription', on_delete=models.CASCADE)),
                ('articleplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wiki.ArticlePlugin')),
                ('subscription', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='django_nyt.Subscription')),
            ],
            options={
                'db_table': 'wiki_notifications_articlesubscription',
                'unique_together': {('subscription', 'articleplugin_ptr')},
            },
            bases=('wiki.articleplugin',),
        ),
        migrations.AlterUniqueTogether(
            name='articlesubscription',
            unique_together=set([('subscription', 'articleplugin_ptr')]),
        ),
    ]

D src/wiki/plugins/notifications/migrations/0002_auto_20151118_1811.py => src/wiki/plugins/notifications/migrations/0002_auto_20151118_1811.py +0 -17
@@ 1,17 0,0 @@
from django.db import migrations, models


class Migration(migrations.Migration):

    atomic = False

    dependencies = [
        ('wiki_notifications', '0001_initial'),
    ]

    operations = [
        migrations.AlterModelTable(
            name='articlesubscription',
            table='wiki_notifications_articlesubscription',
        ),
    ]