# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-04-02 20:00
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import ojs.models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('ojs', '0006_auto_20170327_0856'),
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ojs_jid', models.PositiveIntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Reviewer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ojs_jid', models.PositiveIntegerField(default=0)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='ojsuser',
            unique_together=set([]),
        ),
        migrations.RemoveField(
            model_name='ojsuser',
            name='submission',
        ),
        migrations.RemoveField(
            model_name='ojsuser',
            name='user',
        ),
        migrations.RemoveField(
            model_name='submissionrevision',
            name='file_object',
        ),
        migrations.AddField(
            model_name='submission',
            name='file_object',
            field=models.FileField(default='', upload_to=ojs.models.submission_filename),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='submissionrevision',
            name='version',
            field=models.CharField(default='1.0.0', max_length=8),
        ),
        migrations.DeleteModel(
            name='OJSUser',
        ),
        migrations.AddField(
            model_name='reviewer',
            name='revision',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ojs.SubmissionRevision'),
        ),
        migrations.AddField(
            model_name='reviewer',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='author',
            name='submission',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ojs.Submission'),
        ),
        migrations.AddField(
            model_name='author',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='reviewer',
            unique_together=set([('revision', 'ojs_jid')]),
        ),
        migrations.AlterUniqueTogether(
            name='author',
            unique_together=set([('submission', 'ojs_jid')]),
        ),
    ]

add migration