text: # Generated by Django 2.1.1 on 2018-09-17 04:04
  
  from django.conf import settings
  import django.contrib.postgres.fields.jsonb
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Article',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('doi', models.CharField(max_length=255, null=True)),
                  ('year', models.PositiveIntegerField(null=True)),
                  ('title', models.CharField(max_length=255)),
                  ('abstract', models.TextField(null=True)),
                  ('keywords', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('article_type', models.CharField(choices=[('ORIGINAL', 'original'), ('REPLICATION', 'replication'), ('REPRODUCIBILITY', 'reanalysis - reproducibility'), ('META_ANALYSIS', 'renalysis - meta-analysis'), ('META_RESEARCH', 'renanalysis - meta-research'), ('COMMENTARY', 'commentary')], max_length=255)),
                  ('reporting_standards_type', models.CharField(max_length=255, null=True)),
                  ('created', models.DateTimeField(auto_now_add=True)),
                  ('updated', models.DateTimeField(auto_now=True)),
              ],
          ),
          migrations.CreateModel(
              name='ArticleAuthor',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('order', models.PositiveIntegerField()),
                  ('article', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Article')),
              ],
              options={
                  'ordering': ('order',),
              },
          ),
          migrations.CreateModel(
              name='Author',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('orcid', models.CharField(max_length=255, null=True)),
                  ('first_name', models.CharField(max_length=255)),
                  ('middle_name', models.CharField(max_length=255, null=True)),
                  ('last_name', models.CharField(max_length=255)),
                  ('affiliations', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('profile_urls', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('created', models.DateTimeField(auto_now_add=True)),
                  ('updated', models.DateTimeField(auto_now=True)),
                  ('articles', models.ManyToManyField(related_name='authors', through='curate.ArticleAuthor', to='curate.Article')),
                  ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='Collection',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255)),
                  ('verbal_summary', models.TextField()),
              ],
          ),
          migrations.CreateModel(
              name='Construct',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255)),
              ],
          ),
          migrations.CreateModel(
              name='Effect',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255)),
              ],
          ),
          migrations.CreateModel(
              name='Hypothesis',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255)),
                  ('effect', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Effect')),
              ],
          ),
          migrations.CreateModel(
              name='Journal',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255)),
                  ('issn', models.CharField(max_length=255, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='KeyFigure',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('image_url', models.URLField(null=True)),
                  ('file_name', models.CharField(max_length=255, null=True)),
                  ('is_figure', models.BooleanField()),
                  ('is_table', models.BooleanField()),
                  ('article', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Article')),
              ],
          ),
          migrations.CreateModel(
              name='Method',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=255)),
                  ('method_version', models.CharField(max_length=255, null=True)),
                  ('scoring_procedure', models.CharField(max_length=255, null=True)),
                  ('construct', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Construct')),
              ],
          ),
          migrations.CreateModel(
              name='RelatedArticle',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('is_commentary', models.BooleanField(default=False)),
                  ('is_reproducibilty', models.BooleanField(default=False)),
                  ('is_robustness', models.BooleanField(default=False)),
                  ('order', models.PositiveIntegerField()),
                  ('original_article', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='from_article', to='curate.Article')),
                  ('related_article', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='to_article', to='curate.Article')),
              ],
              options={
                  'ordering': ('order',),
              },
          ),
          migrations.CreateModel(
              name='StatisticalResult',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('effect_size', models.FloatField()),
                  ('alpha', models.FloatField(default=0.05)),
                  ('lower_conf_lim', models.FloatField()),
                  ('upper_conf_lim', models.FloatField()),
                  ('is_reproducible', models.BooleanField(default=False)),
                  ('is_robust', models.BooleanField(default=False)),
                  ('hypothesis', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Hypothesis')),
                  ('result_graph', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='curate.KeyFigure')),
              ],
          ),
          migrations.CreateModel(
              name='Study',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('study_type', models.CharField(max_length=255, null=True)),
                  ('study_number', models.PositiveIntegerField()),
                  ('evidence_type', models.CharField(max_length=255, null=True)),
                  ('reporting_standards_type', models.CharField(max_length=255, null=True)),
                  ('is_replication', models.BooleanField(default=False)),
                  ('method_similarity_type', models.CharField(choices=[('EXACT', 'exact'), ('VERY_SIMILAR', 'very similar'), ('SIMILAR', 'similar')], max_length=255, null=True)),
                  ('method_differences', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('auxiliary_hypo_evidence', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('rep_outcome_category', models.CharField(max_length=255, null=True)),
                  ('article', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='curate.Article')),
                  ('effects', models.ManyToManyField(related_name='studies', to='curate.Effect')),
                  ('replication_of', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='curate.Study')),
              ],
          ),
          migrations.CreateModel(
              name='Transparency',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('transparency_type', models.CharField(choices=[('PREREG', 'prereg'), ('MATERIALS', 'materials'), ('DATA', 'data'), ('CODE', 'code')], max_length=255)),
                  ('url', models.URLField(null=True)),
                  ('created', models.DateTimeField(auto_now_add=True)),
                  ('updated', models.DateTimeField(auto_now=True)),
                  ('article', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Article')),
                  ('study', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='curate.Study')),
              ],
          ),
          migrations.CreateModel(
              name='UserProfile',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('email', models.EmailField(max_length=254)),
                  ('curation_contributions', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('browsing_history', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('tracked_content', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('recommended_contet', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('account_settings', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('research_interests', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                  ('platform_invites', models.PositiveIntegerField(default=0)),
                  ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='VariableRelationship',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('relationship_type', models.CharField(choices=[('POSITIVE', 'POSITIVE'), ('NEGATIVE', 'NEGATIVE'), ('NONLINEAR', 'NONLINEAR')], max_length=255)),
                  ('dep_var', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='dependent_rels', to='curate.Method')),
                  ('hypothesis', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Hypothesis')),
                  ('ind_var', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='independent_rels', to='curate.Method')),
              ],
          ),
          migrations.AddField(
              model_name='statisticalresult',
              name='study',
              field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Study'),
          ),
          migrations.AddField(
              model_name='keyfigure',
              name='study',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='curate.Study'),
          ),
          migrations.AddField(
              model_name='hypothesis',
              name='studies',
              field=models.ManyToManyField(related_name='hypotheses', through='curate.StatisticalResult', to='curate.Study'),
          ),
          migrations.AddField(
              model_name='collection',
              name='creator',
              field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='collections_created', to='curate.UserProfile'),
          ),
          migrations.AddField(
              model_name='collection',
              name='effects',
              field=models.ManyToManyField(related_name='collections', to='curate.Effect'),
          ),
          migrations.AddField(
              model_name='collection',
              name='last_modifier',
              field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='collections_last_modified', to='curate.UserProfile'),
          ),
          migrations.AddField(
              model_name='articleauthor',
              name='author',
              field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='curate.Author'),
          ),
          migrations.AddField(
              model_name='article',
              name='journal',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='curate.Journal'),
          ),
          migrations.AddField(
              model_name='article',
              name='related_articles',
              field=models.ManyToManyField(related_name='original_article', through='curate.RelatedArticle', to='curate.Article'),
          ),
      ]
  