diff --git a/commentaries/migrations/0001_initial.py b/commentaries/migrations/0001_initial.py index 43729dee9a38aed8dc92c2c48b117d7b9f59a0af..9cc185381991a304cba5d35ffba50af25b40e20a 100644 --- a/commentaries/migrations/0001_initial.py +++ b/commentaries/migrations/0001_initial.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Commentary', fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('vetted', models.BooleanField(default=False)), ('type', models.CharField(max_length=9)), ('open_for_commenting', models.BooleanField(default=True)), @@ -25,12 +25,18 @@ class Migration(migrations.Migration): ('author_list', models.CharField(max_length=1000)), ('pub_date', models.DateField(verbose_name='date of original publication')), ('pub_abstract', models.TextField()), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(decimal_places=0, max_digits=3, default=0)), - ('correctness_rating', models.DecimalField(decimal_places=0, max_digits=3, default=0)), - ('usefulness_rating', models.DecimalField(decimal_places=0, max_digits=3, default=0)), + ('nr_clarity_ratings', models.IntegerField(default=0)), + ('clarity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_validity_ratings', models.IntegerField(default=0)), + ('validity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_rigour_ratings', models.IntegerField(default=0)), + ('rigour_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_originality_ratings', models.IntegerField(default=0)), + ('originality_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_significance_ratings', models.IntegerField(default=0)), + ('significance_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), ('latest_activity', models.DateTimeField(default=django.utils.timezone.now)), - ('vetted_by', models.ForeignKey(blank=True, null=True, to='contributors.Contributor')), + ('vetted_by', models.ForeignKey(null=True, to='contributors.Contributor', blank=True)), ], ), ] diff --git a/commentaries/migrations/0002_auto_20151212_0833.py b/commentaries/migrations/0002_auto_20151212_0833.py new file mode 100644 index 0000000000000000000000000000000000000000..70b9d186361e4de24577d248f092f69ee6c93dc7 --- /dev/null +++ b/commentaries/migrations/0002_auto_20151212_0833.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('commentaries', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='commentary', + name='clarity_rating', + field=models.DecimalField(max_digits=3, null=True, decimal_places=0, default=0), + ), + migrations.AlterField( + model_name='commentary', + name='originality_rating', + field=models.DecimalField(max_digits=3, null=True, decimal_places=0, default=0), + ), + migrations.AlterField( + model_name='commentary', + name='rigour_rating', + field=models.DecimalField(max_digits=3, null=True, decimal_places=0, default=0), + ), + migrations.AlterField( + model_name='commentary', + name='significance_rating', + field=models.DecimalField(max_digits=3, null=True, decimal_places=0, default=0), + ), + migrations.AlterField( + model_name='commentary', + name='validity_rating', + field=models.DecimalField(max_digits=3, null=True, decimal_places=0, default=0), + ), + ] diff --git a/commentaries/models.py b/commentaries/models.py index 7b9f32d245dd455411a7e93815765fada12925be..102f3ccbc14a9a8c202514e36fa05d018c6ab226 100644 --- a/commentaries/models.py +++ b/commentaries/models.py @@ -23,10 +23,18 @@ class Commentary(models.Model): author_list = models.CharField(max_length=1000) pub_date = models.DateField(verbose_name='date of original publication') pub_abstract = models.TextField() - nr_ratings = models.IntegerField(default=0) - clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - correctness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - usefulness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + + nr_clarity_ratings = models.IntegerField(default=0) + clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_validity_ratings = models.IntegerField(default=0) + validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_rigour_ratings = models.IntegerField(default=0) + rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_originality_ratings = models.IntegerField(default=0) + originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_significance_ratings = models.IntegerField(default=0) + significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + latest_activity = models.DateTimeField(default=timezone.now) def __str__ (self): diff --git a/commentaries/templates/commentaries/commentary_detail.html b/commentaries/templates/commentaries/commentary_detail.html index d531e197cd226f9b25c1f84254572b5d02fbb120..e359e2e1e3af2dd411279c96ae7067cc58408123 100644 --- a/commentaries/templates/commentaries/commentary_detail.html +++ b/commentaries/templates/commentaries/commentary_detail.html @@ -19,23 +19,14 @@ </div> <div class="col-8"> <ul class="ratingsdata"> - <li>Ratings: ({{ commentary.nr_ratings }})</li> - <li>clarity: {{ commentary.clarity_rating }}%</li> - <li>correctness: {{ commentary.correctness_rating }}%</li> - <li>usefulness: {{ commentary.usefulness_rating }}%</li> + <li>Ratings: </li> + <li>clarity: {{ commentary.clarity_rating }}% ({{ commentary.nr_clarity_ratings }})</li> + <li>validity: {{ commentary.validity_rating }}% ({{ commentary.nr_validity_ratings }})</li> + <li>rigour: {{ commentary.rigour_rating }}% ({{ commentary.nr_rigour_ratings }})</li> + <li>originality: {{ commentary.originality_rating }}% ({{ commentary.nr_originality_ratings }})</li> + <li>significance: {{ commentary.significance_rating }}% ({{ commentary.nr_significance_ratings }})</li> </ul> - {% if user.is_authenticated %} - <form action="{% url 'ratings:vote_on_commentary' commentary_id=commentary.id %}" method="post" class="ratingsdata"> - {% csrf_token %} - <ul> - <li>Rate this publication:</li> - {{ commentary_rating_form.as_ul }} - <li><input type="submit" value="Submit"></li> - </ul> - - </form> - {% endif %} </div> </div> @@ -51,6 +42,18 @@ <h3>Abstract:</h3> <p>{{ commentary.pub_abstract }}</p> + {% if user.is_authenticated %} + <form action="{% url 'ratings:vote_on_commentary' commentary_id=commentary.id %}" method="post" class="ratingsdata"> + {% csrf_token %} + <ul> + <li>Rate this publication:</li> + {{ commentary_rating_form.as_ul }} + <li><input type="submit" value="Submit"></li> + </ul> + + </form> + {% endif %} + </section> {% if reports %} @@ -74,23 +77,14 @@ <div class="col-8"> <ul class="ratingsdata"> - <li>Ratings: ({{ comment.nr_ratings }})</li> - <li>clarity: {{ comment.clarity_rating }}%</li> - <li>correctness: {{ comment.correctness_rating }}%</li> - <li>usefulness: {{ comment.usefulness_rating }}%</li> + <li>Ratings: </li> + <li>clarity: {{ comment.clarity_rating }}% ({{ comment.nr_clarity_ratings }})</li> + <li>validity: {{ comment.validity_rating }}% ({{ comment.nr_validity_ratings }})</li> + <li>rigour: {{ comment.rigour_rating }}% ({{ comment.nr_rigour_ratings }})</li> + <li>originality: {{ comment.originality_rating }}% ({{ comment.nr_originality_ratings }})</li> + <li>significance: {{ comment.significance_rating }}% ({{ comment.nr_significance_ratings }})</li> </ul> - {% if user.is_authenticated %} - <form action="{% url 'ratings:vote_on_comment' comment_id=comment.id %}" method="post" class="ratingsdata"> - {% csrf_token %} - <ul> - <li>Rate this comment:</li> - {{ comment_rating_form.as_ul }} - <li><input type="submit" value="Submit"></li> - </ul> - - </form> - {% endif %} </div> </div> <div class="row"> @@ -99,8 +93,22 @@ <p>{{ comment.comment_text }}</p> </div> </div> + + {% if user.is_authenticated %} + <form action="{% url 'ratings:vote_on_comment' comment_id=comment.id %}" method="post" class="ratingsdata"> + {% csrf_token %} + <ul> + <li>Rate this comment:</li> + {{ comment_rating_form.as_ul }} + <li><input type="submit" value="Submit"></li> + </ul> + + </form> + {% endif %} + {% for reply in author_replies %} {% if reply.in_reply_to_comment.id = comment.id %} + <div class="row"> <div class="col-1"></div> <div class="col-10"> diff --git a/comments/migrations/0001_initial.py b/comments/migrations/0001_initial.py index 7cb6686b219cf72351987368b46cf44cef725009..4d1c98ac09cc4629f684ffbd9182b3ce5c557f3e 100644 --- a/comments/migrations/0001_initial.py +++ b/comments/migrations/0001_initial.py @@ -8,26 +8,69 @@ class Migration(migrations.Migration): dependencies = [ ('contributors', '0001_initial'), + ('reports', '0001_initial'), ('submissions', '0001_initial'), ('commentaries', '0001_initial'), ] operations = [ + migrations.CreateModel( + name='AuthorReply', + fields=[ + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('status', models.SmallIntegerField(default=0)), + ('reply_text', models.TextField()), + ('date_submitted', models.DateTimeField(verbose_name='date submitted')), + ('nr_clarity_ratings', models.IntegerField(default=0)), + ('clarity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_validity_ratings', models.IntegerField(default=0)), + ('validity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_rigour_ratings', models.IntegerField(default=0)), + ('rigour_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_originality_ratings', models.IntegerField(default=0)), + ('originality_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_significance_ratings', models.IntegerField(default=0)), + ('significance_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('author', models.ForeignKey(to='contributors.Contributor')), + ('commentary', models.ForeignKey(null=True, to='commentaries.Commentary', blank=True)), + ], + ), migrations.CreateModel( name='Comment', fields=[ - ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('status', models.SmallIntegerField(default=0)), ('comment_text', models.TextField()), ('date_submitted', models.DateTimeField(verbose_name='date submitted')), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(decimal_places=0, max_digits=3, default=0)), - ('correctness_rating', models.DecimalField(decimal_places=0, max_digits=3, default=0)), - ('usefulness_rating', models.DecimalField(decimal_places=0, max_digits=3, default=0)), + ('nr_clarity_ratings', models.IntegerField(default=0)), + ('clarity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_validity_ratings', models.IntegerField(default=0)), + ('validity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_rigour_ratings', models.IntegerField(default=0)), + ('rigour_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_originality_ratings', models.IntegerField(default=0)), + ('originality_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_significance_ratings', models.IntegerField(default=0)), + ('significance_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), ('author', models.ForeignKey(to='contributors.Contributor')), ('commentary', models.ForeignKey(null=True, to='commentaries.Commentary', blank=True)), ('in_reply_to', models.ForeignKey(null=True, to='comments.Comment', blank=True)), ('submission', models.ForeignKey(null=True, to='submissions.Submission', blank=True)), ], ), + migrations.AddField( + model_name='authorreply', + name='in_reply_to_comment', + field=models.ForeignKey(null=True, to='comments.Comment', blank=True), + ), + migrations.AddField( + model_name='authorreply', + name='in_reply_to_report', + field=models.ForeignKey(null=True, to='reports.Report', blank=True), + ), + migrations.AddField( + model_name='authorreply', + name='submission', + field=models.ForeignKey(null=True, to='submissions.Submission', blank=True), + ), ] diff --git a/comments/migrations/0002_authorreply.py b/comments/migrations/0002_authorreply.py deleted file mode 100644 index 58589164ea933ba245fef5d272367cd0c3f6fd82..0000000000000000000000000000000000000000 --- a/comments/migrations/0002_authorreply.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('contributors', '0001_initial'), - ('reports', '0001_initial'), - ('commentaries', '0001_initial'), - ('submissions', '0001_initial'), - ('comments', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='AuthorReply', - fields=[ - ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), - ('status', models.SmallIntegerField(default=0)), - ('reply_text', models.TextField()), - ('date_submitted', models.DateTimeField(verbose_name='date submitted')), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('author', models.ForeignKey(to='contributors.Contributor')), - ('commentary', models.ForeignKey(blank=True, null=True, to='commentaries.Commentary')), - ('in_reply_to_comment', models.ForeignKey(blank=True, null=True, to='comments.Comment')), - ('in_reply_to_report', models.ForeignKey(blank=True, null=True, to='reports.Report')), - ('submission', models.ForeignKey(blank=True, null=True, to='submissions.Submission')), - ], - ), - ] diff --git a/comments/migrations/0002_auto_20151212_0919.py b/comments/migrations/0002_auto_20151212_0919.py new file mode 100644 index 0000000000000000000000000000000000000000..8d6936decd7e03e84d45ee938726e1ce10d20a35 --- /dev/null +++ b/comments/migrations/0002_auto_20151212_0919.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('comments', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='authorreply', + name='clarity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='authorreply', + name='originality_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='authorreply', + name='rigour_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='authorreply', + name='significance_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='authorreply', + name='validity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='comment', + name='clarity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='comment', + name='originality_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='comment', + name='rigour_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='comment', + name='significance_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='comment', + name='validity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + ] diff --git a/comments/models.py b/comments/models.py index a7712abda55ae1248a8a4b2e64d4822ad72814c7..87e11576db194c26b01e35337fdc5bf4e28d2817 100644 --- a/comments/models.py +++ b/comments/models.py @@ -31,10 +31,16 @@ class Comment(models.Model): comment_text = models.TextField() date_submitted = models.DateTimeField('date submitted') # Aggregates of ratings applied to this comment: - nr_ratings = models.IntegerField(default=0) - clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - correctness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - usefulness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_clarity_ratings = models.IntegerField(default=0) + clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_validity_ratings = models.IntegerField(default=0) + validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_rigour_ratings = models.IntegerField(default=0) + rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_originality_ratings = models.IntegerField(default=0) + originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_significance_ratings = models.IntegerField(default=0) + significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) def __str__ (self): return self.comment_text @@ -57,10 +63,16 @@ class AuthorReply(models.Model): reply_text = models.TextField() date_submitted = models.DateTimeField('date submitted') # Aggregates of ratings applied to this comment: - nr_ratings = models.IntegerField(default=0) - clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - correctness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - usefulness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_clarity_ratings = models.IntegerField(default=0) + clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_validity_ratings = models.IntegerField(default=0) + validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_rigour_ratings = models.IntegerField(default=0) + rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_originality_ratings = models.IntegerField(default=0) + originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_significance_ratings = models.IntegerField(default=0) + significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) def __str__ (self): return self.reply_text diff --git a/contributors/migrations/0001_initial.py b/contributors/migrations/0001_initial.py index 29c0778c152d0bcc3d6c4eff7190cb71ec8dbdc3..ce199ab90cf7311d97c650a47ecdcaea3d68b6ee 100644 --- a/contributors/migrations/0001_initial.py +++ b/contributors/migrations/0001_initial.py @@ -15,21 +15,33 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Contributor', fields=[ - ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), - ('rank', models.SmallIntegerField(default=0, choices=[(0, 'newly registered'), (1, 'normal user'), (2, 'SciPost Commentary Editor'), (3, 'SciPost Journal Editor'), (4, 'SciPost Journal Editor-in-chief'), (5, 'SciPost Lead Editor'), (-1, 'not a professional scientist'), (-2, 'other account already exists'), (-3, 'barred from SciPost'), (-4, 'account disabled')])), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('rank', models.SmallIntegerField(choices=[(0, 'newly registered'), (1, 'normal user'), (2, 'SciPost Commentary Editor'), (3, 'SciPost Journal Editor'), (4, 'SciPost Journal Editor-in-chief'), (5, 'SciPost Lead Editor'), (-1, 'not a professional scientist'), (-2, 'other account already exists'), (-3, 'barred from SciPost'), (-4, 'account disabled')], default=0)), ('title', models.CharField(max_length=4, choices=[('PR', 'Prof.'), ('DR', 'Dr'), ('MR', 'Mr'), ('MRS', 'Mrs')])), - ('orcid_id', models.CharField(blank=True, null=True, max_length=20, default='', verbose_name='ORCID id')), + ('orcid_id', models.CharField(max_length=20, null=True, blank=True, default='', verbose_name='ORCID id')), ('affiliation', models.CharField(max_length=300, verbose_name='affiliation')), - ('address', models.CharField(blank=True, max_length=1000, verbose_name='address')), - ('personalwebpage', models.URLField(blank=True, verbose_name='personal web page')), - ('nr_reports', models.PositiveSmallIntegerField(default=0)), - ('report_clarity_rating', models.DecimalField(decimal_places=0, default=0, max_digits=3)), - ('report_correctness_rating', models.DecimalField(decimal_places=0, default=0, max_digits=3)), - ('report_usefulness_rating', models.DecimalField(decimal_places=0, default=0, max_digits=3)), - ('nr_comments', models.PositiveSmallIntegerField(default=0)), - ('comment_clarity_rating', models.DecimalField(decimal_places=0, default=0, max_digits=3)), - ('comment_correctness_rating', models.DecimalField(decimal_places=0, default=0, max_digits=3)), - ('comment_usefulness_rating', models.DecimalField(decimal_places=0, default=0, max_digits=3)), + ('address', models.CharField(max_length=1000, verbose_name='address', blank=True)), + ('personalwebpage', models.URLField(verbose_name='personal web page', blank=True)), + ('nr_report_clarity_ratings', models.IntegerField(default=0)), + ('report_clarity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_report_validity_ratings', models.IntegerField(default=0)), + ('report_validity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_report_rigour_ratings', models.IntegerField(default=0)), + ('report_rigour_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_report_originality_ratings', models.IntegerField(default=0)), + ('report_originality_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_report_significance_ratings', models.IntegerField(default=0)), + ('report_significance_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_comment_clarity_ratings', models.IntegerField(default=0)), + ('comment_clarity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_comment_validity_ratings', models.IntegerField(default=0)), + ('comment_validity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_comment_rigour_ratings', models.IntegerField(default=0)), + ('comment_rigour_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_comment_originality_ratings', models.IntegerField(default=0)), + ('comment_originality_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_comment_significance_ratings', models.IntegerField(default=0)), + ('comment_significance_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), ], ), diff --git a/contributors/migrations/0002_auto_20151212_0919.py b/contributors/migrations/0002_auto_20151212_0919.py new file mode 100644 index 0000000000000000000000000000000000000000..8984b85a20662df3f806a7e56e59126435a16ccf --- /dev/null +++ b/contributors/migrations/0002_auto_20151212_0919.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('contributors', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='contributor', + name='nr_comments', + field=models.PositiveSmallIntegerField(default=0), + ), + migrations.AddField( + model_name='contributor', + name='nr_reports', + field=models.PositiveSmallIntegerField(default=0), + ), + ] diff --git a/contributors/models.py b/contributors/models.py index 74019c19bcea496f061445f597c9f39df370b1e1..226bcfc9ec695188bd6302072959e3eb09f677d7 100644 --- a/contributors/models.py +++ b/contributors/models.py @@ -47,14 +47,32 @@ class Contributor(models.Model): affiliation = models.CharField(max_length=300, verbose_name='affiliation') address = models.CharField(max_length=1000, blank=True, verbose_name="address") personalwebpage = models.URLField(blank=True, verbose_name='personal web page') - nr_reports = models.PositiveSmallIntegerField(default=0) - report_clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - report_correctness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - report_usefulness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_comments = models.PositiveSmallIntegerField(default=0) + nr_comment_clarity_ratings = models.IntegerField(default=0) comment_clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - comment_correctness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - comment_usefulness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_comment_validity_ratings = models.IntegerField(default=0) + comment_validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_comment_rigour_ratings = models.IntegerField(default=0) + comment_rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_comment_originality_ratings = models.IntegerField(default=0) + comment_originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_comment_significance_ratings = models.IntegerField(default=0) + comment_significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + + nr_reports = models.PositiveSmallIntegerField(default=0) + nr_report_clarity_ratings = models.IntegerField(default=0) + report_clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_report_validity_ratings = models.IntegerField(default=0) + report_validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_report_rigour_ratings = models.IntegerField(default=0) + report_rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_report_originality_ratings = models.IntegerField(default=0) + report_originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + nr_report_significance_ratings = models.IntegerField(default=0) + report_significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + + def __str__ (self): return self.user.username diff --git a/ratings/forms.py b/ratings/forms.py index ed0c4fad3c8402530d74bced2fdf6fe403863436..395c1e0333ac60da87339da2af1b710aff806e22 100644 --- a/ratings/forms.py +++ b/ratings/forms.py @@ -3,31 +3,33 @@ from django import forms from .models import * -class CommentaryRatingForm(forms.Form): +class RatingForm(forms.Form): + """ Abstract base class for all rating forms. """ clarity = forms.ChoiceField(RATING_CHOICES) - correctness = forms.ChoiceField(RATING_CHOICES) - usefulness = forms.ChoiceField(RATING_CHOICES) + validity = forms.ChoiceField(RATING_CHOICES) + rigour = forms.ChoiceField(RATING_CHOICES) + originality = forms.ChoiceField(RATING_CHOICES) + significance = forms.ChoiceField(RATING_CHOICES) + class Meta: + abstract = True -class CommentRatingForm(forms.Form): - clarity = forms.ChoiceField(RATING_CHOICES) - correctness = forms.ChoiceField(RATING_CHOICES) - usefulness = forms.ChoiceField(RATING_CHOICES) +class CommentaryRatingForm(RatingForm): + pass -class AuthorReplyRatingForm(forms.Form): - clarity = forms.ChoiceField(RATING_CHOICES) - correctness = forms.ChoiceField(RATING_CHOICES) - usefulness = forms.ChoiceField(RATING_CHOICES) +class CommentRatingForm(RatingForm): + pass -class SubmissionRatingForm(forms.Form): - clarity = forms.ChoiceField(RATING_CHOICES) - correctness = forms.ChoiceField(RATING_CHOICES) - usefulness = forms.ChoiceField(RATING_CHOICES) +class AuthorReplyRatingForm(RatingForm): + pass -class ReportRatingForm(forms.Form): - clarity = forms.ChoiceField(RATING_CHOICES) - correctness = forms.ChoiceField(RATING_CHOICES) - usefulness = forms.ChoiceField(RATING_CHOICES) + +class SubmissionRatingForm(RatingForm): + pass + + +class ReportRatingForm(RatingForm): + pass diff --git a/ratings/migrations/0001_initial.py b/ratings/migrations/0001_initial.py index ad01b59962b2df58ff764527dfa538c762c0ad7e..db9ed9aface1107a61c94f661a7842b8a8b8e6d7 100644 --- a/ratings/migrations/0001_initial.py +++ b/ratings/migrations/0001_initial.py @@ -8,66 +8,91 @@ class Migration(migrations.Migration): dependencies = [ ('comments', '0001_initial'), - ('commentaries', '0001_initial'), - ('submissions', '0001_initial'), ('contributors', '0001_initial'), - ('scipost', '0006_auto_20151203_0935'), + ('reports', '0001_initial'), + ('submissions', '0001_initial'), + ('commentaries', '0001_initial'), ] operations = [ migrations.CreateModel( name='AuthorReplyRating', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('clarity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('originality', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('significance', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('rater', models.ForeignKey(to='contributors.Contributor')), - ('reply', models.ForeignKey(to='scipost.AuthorReply')), + ('reply', models.ForeignKey(to='comments.AuthorReply')), ], + options={ + 'abstract': False, + }, ), migrations.CreateModel( name='CommentaryRating', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('clarity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('originality', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('significance', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('commentary', models.ForeignKey(to='commentaries.Commentary')), ('rater', models.ForeignKey(to='contributors.Contributor')), ], + options={ + 'abstract': False, + }, ), migrations.CreateModel( name='CommentRating', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('clarity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('originality', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('significance', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('comment', models.ForeignKey(to='comments.Comment')), ('rater', models.ForeignKey(to='contributors.Contributor')), ], + options={ + 'abstract': False, + }, ), migrations.CreateModel( name='ReportRating', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('clarity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('originality', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('significance', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('rater', models.ForeignKey(to='contributors.Contributor')), - ('report', models.ForeignKey(to='scipost.Report')), + ('report', models.ForeignKey(to='reports.Report')), ], + options={ + 'abstract': False, + }, ), migrations.CreateModel( name='SubmissionRating', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), + ('clarity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('validity', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('rigour', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('originality', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), + ('significance', models.PositiveSmallIntegerField(default=0, verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), ('rater', models.ForeignKey(to='contributors.Contributor')), ('submission', models.ForeignKey(to='submissions.Submission')), ], + options={ + 'abstract': False, + }, ), ] diff --git a/ratings/migrations/0002_auto_20151203_0938.py b/ratings/migrations/0002_auto_20151203_0938.py deleted file mode 100644 index 6de0d7242f2a3232cd8722e3c8f2e7de49359fb3..0000000000000000000000000000000000000000 --- a/ratings/migrations/0002_auto_20151203_0938.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ratings', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='reportrating', - name='report', - field=models.ForeignKey(to='reports.Report'), - ), - ] diff --git a/ratings/migrations/0002_auto_20151212_0800.py b/ratings/migrations/0002_auto_20151212_0800.py new file mode 100644 index 0000000000000000000000000000000000000000..16dcfbd7321c80df32215d400bc8633069fa7892 --- /dev/null +++ b/ratings/migrations/0002_auto_20151212_0800.py @@ -0,0 +1,139 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ratings', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='authorreplyrating', + name='clarity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='authorreplyrating', + name='originality', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='authorreplyrating', + name='rigour', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='authorreplyrating', + name='significance', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='authorreplyrating', + name='validity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentaryrating', + name='clarity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentaryrating', + name='originality', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentaryrating', + name='rigour', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentaryrating', + name='significance', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentaryrating', + name='validity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentrating', + name='clarity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentrating', + name='originality', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentrating', + name='rigour', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentrating', + name='significance', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='commentrating', + name='validity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='reportrating', + name='clarity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='reportrating', + name='originality', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='reportrating', + name='rigour', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='reportrating', + name='significance', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='reportrating', + name='validity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='submissionrating', + name='clarity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='submissionrating', + name='originality', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='submissionrating', + name='rigour', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='submissionrating', + name='significance', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + migrations.AlterField( + model_name='submissionrating', + name='validity', + field=models.PositiveSmallIntegerField(verbose_name=((101, 'abstain'), (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')), default=0, null=True), + ), + ] diff --git a/ratings/migrations/0003_auto_20151203_1005.py b/ratings/migrations/0003_auto_20151203_1005.py deleted file mode 100644 index 538928b67d8682a4e76212d6ee7978f1e38903d3..0000000000000000000000000000000000000000 --- a/ratings/migrations/0003_auto_20151203_1005.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ratings', '0002_auto_20151203_0938'), - ] - - operations = [ - migrations.AlterField( - model_name='authorreplyrating', - name='reply', - field=models.ForeignKey(to='comments.AuthorReply'), - ), - ] diff --git a/ratings/models.py b/ratings/models.py index 858e1d8a5978c0ab5ecb17a33c030619498e41f9..e8db16fcd5806de23a519d436b85bbdef24e345a 100644 --- a/ratings/models.py +++ b/ratings/models.py @@ -5,14 +5,6 @@ from django.contrib.auth.models import User from .models import * -#from commentaries.models import * -#from comments.models import * -#from contributors.models import * -#from journals.models import * -#from reports.models import * -#from scipost.models import * -#from submissions.models import * - from commentaries.models import Commentary from comments.models import Comment, AuthorReply from contributors.models import Contributor @@ -21,50 +13,45 @@ from submissions.models import Submission RATING_CHOICES = ( + (101, 'abstain'), # Only values between 0 and 100 are kept, anything outside those limits is discarded. (100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%') ) -class CommentaryRating(models.Model): +class Rating(models.Model): + """ Abstract base class for all ratings. """ + rater = models.ForeignKey(Contributor) + clarity = models.PositiveSmallIntegerField(RATING_CHOICES, default=0, null=True) + validity = models.PositiveSmallIntegerField(RATING_CHOICES, default=0, null=True) + rigour = models.PositiveSmallIntegerField(RATING_CHOICES, default=0, null=True) + originality = models.PositiveSmallIntegerField(RATING_CHOICES, default=0, null=True) + significance = models.PositiveSmallIntegerField(RATING_CHOICES, default=0, null=True) + + class Meta: + abstract = True + + +class CommentaryRating(Rating): """ A Commentary rating is a set of numbers quantifying the original publication subject to a Commentary. """ commentary = models.ForeignKey(Commentary) - rater = models.ForeignKey(Contributor) - clarity = models.PositiveSmallIntegerField(RATING_CHOICES) - correctness = models.PositiveSmallIntegerField(RATING_CHOICES) - usefulness = models.PositiveSmallIntegerField(RATING_CHOICES) -class SubmissionRating(models.Model): - """ A Submission rating is a set of numbers quantifying various requirements of a Submission. """ - submission = models.ForeignKey(Submission) - rater = models.ForeignKey(Contributor) - clarity = models.PositiveSmallIntegerField(RATING_CHOICES) - correctness = models.PositiveSmallIntegerField(RATING_CHOICES) - usefulness = models.PositiveSmallIntegerField(RATING_CHOICES) +class CommentRating(Rating): + """ A Comment rating is a set of numbers quantifying various requirements of a Comment. """ + comment = models.ForeignKey(Comment) + +class AuthorReplyRating(Rating): + reply = models.ForeignKey(AuthorReply) -class ReportRating(models.Model): +class ReportRating(Rating): """ A Report rating is a set of numbers quantifying various requirements of a Report. """ report = models.ForeignKey(Report) - rater = models.ForeignKey(Contributor) - clarity = models.PositiveSmallIntegerField(RATING_CHOICES) - correctness = models.PositiveSmallIntegerField(RATING_CHOICES) - usefulness = models.PositiveSmallIntegerField(RATING_CHOICES) -class CommentRating(models.Model): - """ A Comment rating is a set of numbers quantifying various requirements of a Comment. """ - comment = models.ForeignKey(Comment) - rater = models.ForeignKey(Contributor) - clarity = models.PositiveSmallIntegerField(RATING_CHOICES) - correctness = models.PositiveSmallIntegerField(RATING_CHOICES) - usefulness = models.PositiveSmallIntegerField(RATING_CHOICES) +class SubmissionRating(Rating): + """ A Submission rating is a set of numbers quantifying various requirements of a Submission. """ + submission = models.ForeignKey(Submission) -class AuthorReplyRating(models.Model): - reply = models.ForeignKey(AuthorReply) - rater = models.ForeignKey(Contributor) - clarity = models.PositiveSmallIntegerField(RATING_CHOICES) - correctness = models.PositiveSmallIntegerField(RATING_CHOICES) - usefulness = models.PositiveSmallIntegerField(RATING_CHOICES) diff --git a/ratings/views.py b/ratings/views.py index 360184468ce2e21cece58f3088839b017ceb594a..971fe984dbd88a8480da190a3c0797413695ed62 100644 --- a/ratings/views.py +++ b/ratings/views.py @@ -29,16 +29,28 @@ def vote_on_commentary(request, commentary_id): commentary = commentary, rater = Contributor.objects.get(user=request.user), clarity = form.cleaned_data['clarity'], - correctness = form.cleaned_data['correctness'], - usefulness = form.cleaned_data['usefulness'], + validity = form.cleaned_data['validity'], + rigour = form.cleaned_data['rigour'], + originality = form.cleaned_data['originality'], + significance = form.cleaned_data['significance'], ) newrating.save() - commentary.nr_ratings = CommentaryRating.objects.filter(commentary=commentary).count() +# commentary.nr_ratings = CommentaryRating.objects.filter(commentary=commentary).count() + commentary.nr_clarity_ratings = CommentaryRating.objects.filter(commentary=commentary, clarity__lte=100).count() + commentary.nr_validity_ratings = CommentaryRating.objects.filter(commentary=commentary, validity__lte=100).count() + commentary.nr_rigour_ratings = CommentaryRating.objects.filter(commentary=commentary, rigour__lte=100).count() + commentary.nr_originality_ratings = CommentaryRating.objects.filter(commentary=commentary, originality__lte=100).count() + commentary.nr_significance_ratings = CommentaryRating.objects.filter(commentary=commentary, significance__lte=100).count() commentary.save() # Recalculate the ratings for this report: - commentary.clarity_rating = CommentaryRating.objects.filter(commentary=commentary).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] - commentary.correctness_rating = CommentaryRating.objects.filter(commentary=commentary).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] - commentary.usefulness_rating = CommentaryRating.objects.filter(commentary=commentary).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] +# commentary.clarity_rating = CommentaryRating.objects.filter(commentary=commentary).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] +# commentary.correctness_rating = CommentaryRating.objects.filter(commentary=commentary).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] +# commentary.usefulness_rating = CommentaryRating.objects.filter(commentary=commentary).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] + commentary.clarity_rating = CommentaryRating.objects.filter(commentary=commentary, clarity__lte=100).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] + commentary.validity_rating = CommentaryRating.objects.filter(commentary=commentary, validity__lte=100).aggregate(avg_validity=Avg('validity'))['avg_validity'] + commentary.rigour_rating = CommentaryRating.objects.filter(commentary=commentary, rigour__lte=100).aggregate(avg_rigour=Avg('rigour'))['avg_rigour'] + commentary.originality_rating = CommentaryRating.objects.filter(commentary=commentary, originality__lte=100).aggregate(avg_originality=Avg('originality'))['avg_originality'] + commentary.significance_rating = CommentaryRating.objects.filter(commentary=commentary, significance__lte=100).aggregate(avg_significance=Avg('significance'))['avg_significance'] commentary.save() return HttpResponseRedirect(reverse('ratings:vote_on_commentary_ack')) @@ -63,35 +75,67 @@ def vote_on_comment(request, comment_id): comment = comment, rater = Contributor.objects.get(user=request.user), clarity = form.cleaned_data['clarity'], - correctness = form.cleaned_data['correctness'], - usefulness = form.cleaned_data['usefulness'], - ) + validity = form.cleaned_data['validity'], + rigour = form.cleaned_data['rigour'], + originality = form.cleaned_data['originality'], + significance = form.cleaned_data['significance'], + ) newrating.save() -# comment.nr_ratings += 1 - comment.nr_ratings = CommentRating.objects.filter(comment=comment).count() + # comment.nr_ratings += 1 + # comment.nr_ratings = CommentRating.objects.filter(comment=comment).count() + comment.nr_clarity_ratings = CommentRating.objects.filter(comment=comment, clarity__lte=100).count() + comment.nr_validity_ratings = CommentRating.objects.filter(comment=comment, validity__lte=100).count() + comment.nr_rigour_ratings = CommentRating.objects.filter(comment=comment, rigour__lte=100).count() + comment.nr_originality_ratings = CommentRating.objects.filter(comment=comment, originality__lte=100).count() + comment.nr_significance_ratings = CommentRating.objects.filter(comment=comment, significance__lte=100).count() comment.save() # Recalculate the ratings for this comment: - comment.clarity_rating = CommentRating.objects.filter(comment=comment).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] - comment.correctness_rating = CommentRating.objects.filter(comment=comment).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] - comment.usefulness_rating = CommentRating.objects.filter(comment=comment).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] + #comment.clarity_rating = CommentRating.objects.filter(comment=comment).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] + #comment.correctness_rating = CommentRating.objects.filter(comment=comment).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] + #comment.usefulness_rating = CommentRating.objects.filter(comment=comment).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] + comment.clarity_rating = CommentRating.objects.filter(comment=comment, clarity__lte=100).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] + comment.validity_rating = CommentRating.objects.filter(comment=comment, validity__lte=100).aggregate(avg_validity=Avg('validity'))['avg_validity'] + comment.rigour_rating = CommentRating.objects.filter(comment=comment, rigour__lte=100).aggregate(avg_rigour=Avg('rigour'))['avg_rigour'] + comment.originality_rating = CommentRating.objects.filter(comment=comment, originality__lte=100).aggregate(avg_originality=Avg('originality'))['avg_originality'] + comment.significance_rating = CommentRating.objects.filter(comment=comment, significance__lte=100).aggregate(avg_significance=Avg('significance'))['avg_significance'] comment.save() # Recalculate the comment_ratings for the comment's author: comment.author.comment_clarity_rating = 0 - comment.author.comment_correctness_rating = 0 - comment.author.comment_usefulness_rating = 0 - nr_ratings_author = 0 + comment.author.comment_validity_rating = 0 + comment.author.comment_rigour_rating = 0 + comment.author.comment_originality_rating = 0 + comment.author.comment_significance_rating = 0 + + nr_clarity_ratings_author = 0 + nr_validity_ratings_author = 0 + nr_rigour_ratings_author = 0 + nr_originality_ratings_author = 0 + nr_significance_ratings_author = 0 clarity_rating_sum_author = 0 - correctness_rating_sum_author = 0 - usefulness_rating_sum_author = 0 + validity_rating_sum_author = 0 + rigour_rating_sum_author = 0 + originality_rating_sum_author = 0 + significance_rating_sum_author = 0 + comments_from_author = Comment.objects.filter(author=comment.author) for com in comments_from_author: - nr_ratings_author += com.nr_ratings - clarity_rating_sum_author += com.nr_ratings * com.clarity_rating - correctness_rating_sum_author += com.nr_ratings * com.correctness_rating - usefulness_rating_sum_author += com.nr_ratings * com.usefulness_rating - comment.author.comment_clarity_rating = clarity_rating_sum_author/max(1, nr_ratings_author) - comment.author.comment_correctness_rating = correctness_rating_sum_author/max(1, nr_ratings_author) - comment.author.comment_usefulness_rating = usefulness_rating_sum_author/max(1, nr_ratings_author) + nr_clarity_ratings_author += com.nr_clarity_ratings + clarity_rating_sum_author += com.nr_clarity_ratings * com.clarity_rating + nr_validity_ratings_author += com.nr_validity_ratings + clarity_rating_sum_author += com.nr_validity_ratings * com.validity_rating + nr_rigour_ratings_author += com.nr_rigour_ratings + rigour_rating_sum_author += com.nr_rigour_ratings * com.rigour_rating + nr_originality_ratings_author += com.nr_originality_ratings + originality_rating_sum_author += com.nr_originality_ratings * com.originality_rating + nr_significance_ratings_author += com.nr_significance_ratings + significance_rating_sum_author += com.nr_significance_ratings * com.significance_rating + + comment.author.comment_clarity_rating = clarity_rating_sum_author/max(1, nr_clarity_ratings_author) + comment.author.comment_validity_rating = validity_rating_sum_author/max(1, nr_validity_ratings_author) + comment.author.comment_rigour_rating = rigour_rating_sum_author/max(1, nr_rigour_ratings_author) + comment.author.comment_originality_rating = originality_rating_sum_author/max(1, nr_originality_ratings_author) + comment.author.comment_significance_rating = significance_rating_sum_author/max(1, nr_significance_ratings_author) + comment.author.save() # request.session['commentary_id'] = commentary_id return HttpResponseRedirect(reverse('ratings:vote_on_comment_ack')) @@ -126,35 +170,67 @@ def vote_on_report(request, report_id): report = report, rater = Contributor.objects.get(user=request.user), clarity = form.cleaned_data['clarity'], - correctness = form.cleaned_data['correctness'], - usefulness = form.cleaned_data['usefulness'], + validity = form.cleaned_data['validity'], + rigour = form.cleaned_data['rigour'], + originality = form.cleaned_data['originality'], + significance = form.cleaned_data['significance'], ) newrating.save() # comment.nr_ratings += 1 - report.nr_ratings = ReportRating.objects.filter(report=report).count() +# report.nr_ratings = ReportRating.objects.filter(report=report).count() + report.nr_clarity_ratings = ReportRating.objects.filter(report=report, clarity__lte=100).count() + report.nr_validity_ratings = ReportRating.objects.filter(report=report, validity__lte=100).count() + report.nr_rigour_ratings = ReportRating.objects.filter(report=report, rigour__lte=100).count() + report.nr_originality_ratings = ReportRating.objects.filter(report=report, originality__lte=100).count() + report.nr_significance_ratings = ReportRating.objects.filter(report=report, significance__lte=100).count() report.save() # Recalculate the ratings for this report: - report.clarity_rating = ReportRating.objects.filter(report=report).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] - report.correctness_rating = ReportRating.objects.filter(report=report).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] - report.usefulness_rating = ReportRating.objects.filter(report=report).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] +# report.clarity_rating = ReportRating.objects.filter(report=report).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] +# report.correctness_rating = ReportRating.objects.filter(report=report).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] +# report.usefulness_rating = ReportRating.objects.filter(report=report).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] + report.clarity_rating = ReportRating.objects.filter(report=report, clarity__lte=100).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] + report.validity_rating = ReportRating.objects.filter(report=report, validity__lte=100).aggregate(avg_validity=Avg('validity'))['avg_validity'] + report.rigour_rating = ReportRating.objects.filter(report=report, rigour__lte=100).aggregate(avg_rigour=Avg('rigour'))['avg_rigour'] + report.originality_rating = ReportRating.objects.filter(report=report, originality__lte=100).aggregate(avg_originality=Avg('originality'))['avg_originality'] + report.significance_rating = ReportRating.objects.filter(report=report, significance__lte=100).aggregate(avg_significance=Avg('significance'))['avg_significance'] report.save() # Recalculate the report_ratings for the report's author: report.author.report_clarity_rating = 0 - report.author.report_correctness_rating = 0 - report.author.report_usefulness_rating = 0 - nr_ratings_author = 0 + report.author.report_validity_rating = 0 + report.author.report_rigour_rating = 0 + report.author.report_originality_rating = 0 + report.author.report_significance_rating = 0 + + nr_clarity_ratings_author = 0 + nr_validity_ratings_author = 0 + nr_rigour_ratings_author = 0 + nr_originality_ratings_author = 0 + nr_significance_ratings_author = 0 clarity_rating_sum_author = 0 - correctness_rating_sum_author = 0 - usefulness_rating_sum_author = 0 + validity_rating_sum_author = 0 + rigour_rating_sum_author = 0 + originality_rating_sum_author = 0 + significance_rating_sum_author = 0 + reports_from_author = Report.objects.filter(author=report.author) for rep in reports_from_author: - nr_ratings_author += rep.nr_ratings - clarity_rating_sum_author += rep.nr_ratings * rep.clarity_rating - correctness_rating_sum_author += rep.nr_ratings * rep.correctness_rating - usefulness_rating_sum_author += rep.nr_ratings * rep.usefulness_rating - report.author.report_clarity_rating = clarity_rating_sum_author/max(1, nr_ratings_author) - report.author.report_correctness_rating = correctness_rating_sum_author/max(1, nr_ratings_author) - report.author.report_usefulness_rating = usefulness_rating_sum_author/max(1, nr_ratings_author) + nr_clarity_ratings_author += rep.nr_clarity_ratings + clarity_rating_sum_author += rep.nr_clarity_ratings * rep.clarity_rating + nr_validity_ratings_author += rep.nr_validity_ratings + clarity_rating_sum_author += rep.nr_validity_ratings * rep.validity_rating + nr_rigour_ratings_author += rep.nr_rigour_ratings + rigour_rating_sum_author += rep.nr_rigour_ratings * rep.rigour_rating + nr_originality_ratings_author += rep.nr_originality_ratings + originality_rating_sum_author += rep.nr_originality_ratings * rep.originality_rating + nr_significance_ratings_author += rep.nr_significance_ratings + significance_rating_sum_author += rep.nr_significance_ratings * rep.significance_rating + + report.author.report_clarity_rating = clarity_rating_sum_author/max(1, nr_clarity_ratings_author) + report.author.report_validity_rating = validity_rating_sum_author/max(1, nr_validity_ratings_author) + report.author.report_rigour_rating = rigour_rating_sum_author/max(1, nr_rigour_ratings_author) + report.author.report_originality_rating = originality_rating_sum_author/max(1, nr_originality_ratings_author) + report.author.report_significance_rating = significance_rating_sum_author/max(1, nr_significance_ratings_author) + report.author.save() return HttpResponseRedirect(reverse('ratings:vote_on_report_ack')) @@ -181,16 +257,28 @@ def vote_on_submission(request, submission_id): submission = submission, rater = Contributor.objects.get(user=request.user), clarity = form.cleaned_data['clarity'], - correctness = form.cleaned_data['correctness'], - usefulness = form.cleaned_data['usefulness'], + validity = form.cleaned_data['validity'], + rigour = form.cleaned_data['rigour'], + originality = form.cleaned_data['originality'], + significance = form.cleaned_data['significance'], ) newrating.save() - submission.nr_ratings = SubmissionRating.objects.filter(submission=submission).count() + #submission.nr_ratings = SubmissionRating.objects.filter(submission=submission).count() + submission.nr_clarity_ratings = SubmissionRating.objects.filter(submission=submission, clarity__lte=100).count() + submission.nr_validity_ratings = SubmissionRating.objects.filter(submission=submission, validity__lte=100).count() + submission.nr_rigour_ratings = SubmissionRating.objects.filter(submission=submission, rigour__lte=100).count() + submission.nr_originality_ratings = SubmissionRating.objects.filter(submission=submission, originality__lte=100).count() + submission.nr_significance_ratings = SubmissionRating.objects.filter(submission=submission, significance__lte=100).count() submission.save() # Recalculate the ratings for this report: - submission.clarity_rating = SubmissionRating.objects.filter(submission=submission).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] - submission.correctness_rating = SubmissionRating.objects.filter(submission=submission).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] - submission.usefulness_rating = SubmissionRating.objects.filter(submission=submission).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] +# submission.clarity_rating = SubmissionRating.objects.filter(submission=submission).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] +# submission.correctness_rating = SubmissionRating.objects.filter(submission=submission).aggregate(avg_correctness=Avg('correctness'))['avg_correctness'] +# submission.usefulness_rating = SubmissionRating.objects.filter(submission=submission).aggregate(avg_usefulness=Avg('usefulness'))['avg_usefulness'] + submission.clarity_rating = SubmissionRating.objects.filter(submission=submission, clarity__lte=100).aggregate(avg_clarity=Avg('clarity'))['avg_clarity'] + submission.validity_rating = SubmissionRating.objects.filter(submission=submission, validity__lte=100).aggregate(avg_validity=Avg('validity'))['avg_validity'] + submission.rigour_rating = SubmissionRating.objects.filter(submission=submission, rigour__lte=100).aggregate(avg_rigour=Avg('rigour'))['avg_rigour'] + submission.originality_rating = SubmissionRating.objects.filter(submission=submission, originality__lte=100).aggregate(avg_originality=Avg('originality'))['avg_originality'] + submission.significance_rating = SubmissionRating.objects.filter(submission=submission, significance__lte=100).aggregate(avg_significance=Avg('significance'))['avg_significance'] submission.save() return HttpResponseRedirect(reverse('ratings:vote_on_submission_ack')) diff --git a/reports/migrations/0001_initial.py b/reports/migrations/0001_initial.py index e1ed4a07ead5f23d690fd1eabfa4fcf49bd65210..2c3eb91466b38c76905e6a0bda95c8aea4cc7777 100644 --- a/reports/migrations/0001_initial.py +++ b/reports/migrations/0001_initial.py @@ -7,15 +7,15 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('submissions', '0001_initial'), ('contributors', '0001_initial'), + ('submissions', '0001_initial'), ] operations = [ migrations.CreateModel( name='Report', fields=[ - ('id', models.AutoField(auto_created=True, serialize=False, primary_key=True, verbose_name='ID')), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('status', models.SmallIntegerField(default=0)), ('qualification', models.PositiveSmallIntegerField(default=0)), ('strengths', models.TextField()), @@ -23,14 +23,20 @@ class Migration(migrations.Migration): ('report', models.TextField()), ('requested_changes', models.TextField()), ('recommendation', models.SmallIntegerField(choices=[(1, 'Publish as Tier I (top 10% of papers in this journal)'), (2, 'Publish as Tier II (top 50% of papers in this journal)'), (3, 'Publish as Tier III (meets the criteria of this journal)'), (-1, 'Ask for minor revision'), (-2, 'Ask for major revision'), (-3, 'Reject')])), - ('date_invited', models.DateTimeField(null=True, blank=True, verbose_name='date invited')), + ('date_invited', models.DateTimeField(null=True, verbose_name='date invited', blank=True)), ('date_submitted', models.DateTimeField(verbose_name='date submitted')), - ('nr_ratings', models.IntegerField(default=0)), + ('nr_clarity_ratings', models.IntegerField(default=0)), ('clarity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), - ('correctness_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), - ('usefulness_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_validity_ratings', models.IntegerField(default=0)), + ('validity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_rigour_ratings', models.IntegerField(default=0)), + ('rigour_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_originality_ratings', models.IntegerField(default=0)), + ('originality_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_significance_ratings', models.IntegerField(default=0)), + ('significance_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), ('author', models.ForeignKey(to='contributors.Contributor')), - ('invited_by', models.ForeignKey(related_name='invited_by', blank=True, to='contributors.Contributor', null=True)), + ('invited_by', models.ForeignKey(null=True, to='contributors.Contributor', related_name='invited_by', blank=True)), ('submission', models.ForeignKey(to='submissions.Submission')), ], ), diff --git a/reports/migrations/0002_auto_20151212_0919.py b/reports/migrations/0002_auto_20151212_0919.py new file mode 100644 index 0000000000000000000000000000000000000000..05f181a4b8541831dae80f81173fc6cfca0293ca --- /dev/null +++ b/reports/migrations/0002_auto_20151212_0919.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reports', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='report', + name='clarity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='report', + name='originality_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='report', + name='rigour_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='report', + name='significance_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='report', + name='validity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + ] diff --git a/reports/models.py b/reports/models.py index 833614b2c64900e56ee5cd0bac6d94e0433b6fe4..e796ac4fc657057279f29df5492fc4d671269ed7 100644 --- a/reports/models.py +++ b/reports/models.py @@ -48,9 +48,15 @@ class Report(models.Model): invited_by = models.ForeignKey(Contributor, blank=True, null=True, related_name='invited_by') date_submitted = models.DateTimeField('date submitted') # Aggregates of ratings applied to this report: - nr_ratings = models.IntegerField(default=0) - clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - correctness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - usefulness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - + nr_clarity_ratings = models.IntegerField(default=0) + clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_validity_ratings = models.IntegerField(default=0) + validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_rigour_ratings = models.IntegerField(default=0) + rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_originality_ratings = models.IntegerField(default=0) + originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_significance_ratings = models.IntegerField(default=0) + significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + diff --git a/scipost/migrations/0001_initial.py b/scipost/migrations/0001_initial.py deleted file mode 100644 index 5693cb709722204fe587a3add90e9c6b3e5f013b..0000000000000000000000000000000000000000 --- a/scipost/migrations/0001_initial.py +++ /dev/null @@ -1,255 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models -import django.utils.timezone -from django.conf import settings - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='AuthorReply', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('status', models.SmallIntegerField(default=0)), - ('reply_text', models.TextField()), - ('date_submitted', models.DateTimeField(verbose_name='date submitted')), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ], - ), - migrations.CreateModel( - name='AuthorReplyRating', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ], - ), - migrations.CreateModel( - name='Comment', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('status', models.SmallIntegerField(default=0)), - ('comment_text', models.TextField()), - ('date_submitted', models.DateTimeField(verbose_name='date submitted')), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ], - ), - migrations.CreateModel( - name='Commentary', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('vetted', models.BooleanField(default=False)), - ('type', models.CharField(max_length=9)), - ('open_for_commenting', models.BooleanField(default=True)), - ('pub_title', models.CharField(max_length=300)), - ('arxiv_link', models.URLField(verbose_name='arXiv link (including version nr)')), - ('pub_DOI_link', models.URLField(verbose_name='DOI link to the original publication')), - ('author_list', models.CharField(max_length=1000)), - ('pub_date', models.DateField(verbose_name='date of original publication')), - ('pub_abstract', models.TextField()), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('latest_activity', models.DateTimeField(default=django.utils.timezone.now)), - ], - ), - migrations.CreateModel( - name='CommentaryRating', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('commentary', models.ForeignKey(to='scipost.Commentary')), - ], - ), - migrations.CreateModel( - name='CommentRating', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('comment', models.ForeignKey(to='scipost.Comment')), - ], - ), - migrations.CreateModel( - name='Contributor', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('rank', models.SmallIntegerField(default=0, choices=[(0, 'newly registered'), (1, 'normal user'), (2, 'SciPost Commentary Editor'), (3, 'SciPost Journal Editor'), (4, 'SciPost Journal Editor-in-chief'), (5, 'SciPost Lead Editor'), (-1, 'not a professional scientist'), (-2, 'other account already exists'), (-3, 'barred from SciPost'), (-4, 'account disabled')])), - ('title', models.CharField(choices=[('PR', 'Prof.'), ('DR', 'Dr'), ('MR', 'Mr'), ('MRS', 'Mrs')], max_length=4)), - ('orcid_id', models.CharField(default='', verbose_name='ORCID id', max_length=20, null=True, blank=True)), - ('affiliation', models.CharField(verbose_name='affiliation', max_length=300)), - ('address', models.CharField(verbose_name='address', max_length=1000, blank=True)), - ('personalwebpage', models.URLField(verbose_name='personal web page', blank=True)), - ('nr_reports', models.PositiveSmallIntegerField(default=0)), - ('report_clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('report_correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('report_usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('nr_comments', models.PositiveSmallIntegerField(default=0)), - ('comment_clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('comment_correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('comment_usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='Report', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('status', models.SmallIntegerField(default=0)), - ('qualification', models.PositiveSmallIntegerField(default=0)), - ('strengths', models.TextField()), - ('weaknesses', models.TextField()), - ('report', models.TextField()), - ('requested_changes', models.TextField()), - ('recommendation', models.SmallIntegerField(choices=[(1, 'Publish as Tier I (top 10% of papers in this journal)'), (2, 'Publish as Tier II (top 50% of papers in this journal)'), (3, 'Publish as Tier III (meets the criteria of this journal)'), (-1, 'Ask for minor revision'), (-2, 'Ask for major revision'), (-3, 'Reject')])), - ('date_invited', models.DateTimeField(verbose_name='date invited', null=True, blank=True)), - ('date_submitted', models.DateTimeField(verbose_name='date submitted')), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('author', models.ForeignKey(to='scipost.Contributor')), - ('invited_by', models.ForeignKey(related_name='invited_by', to='scipost.Contributor', null=True, blank=True)), - ], - ), - migrations.CreateModel( - name='ReportRating', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('rater', models.ForeignKey(to='scipost.Contributor')), - ('report', models.ForeignKey(to='scipost.Report')), - ], - ), - migrations.CreateModel( - name='Submission', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('vetted', models.BooleanField(default=False)), - ('submitted_to_journal', models.CharField(choices=[('SciPost Physics Select', 'SciPost Physics Select'), ('SciPost Physics Letters', 'SciPost Physics Letters'), ('SciPost Physics X', 'SciPost Physics X (cross-division)'), ('SciPost Physics', 'SciPost Physics (Experimental, Theoretical and Computational)')], max_length=30)), - ('domain', models.CharField(default='E', choices=[('E', 'Experimental'), ('T', 'Theoretical'), ('C', 'Computational')], max_length=1)), - ('specialization', models.CharField(choices=[('A', 'Atomic, Molecular and Optical Physics'), ('B', 'Biophysics'), ('C', 'Condensed Matter Physics'), ('F', 'Fluid Dynamics'), ('G', 'Gravitation, Cosmology and Astroparticle Physics'), ('H', 'High-Energy Physics'), ('M', 'Mathematical Physics'), ('N', 'Nuclear Physics'), ('Q', 'Quantum Statistical Mechanics'), ('S', 'Statistical and Soft Matter Physics')], max_length=1)), - ('status', models.SmallIntegerField(choices=[(0, 'unassigned'), (1, 'editor in charge assigned'), (2, 'under review'), (3, 'reviewed, peer checking period'), (4, 'reviewed, peer checked, editorial decision pending'), (5, 'editorial decision')])), - ('open_for_reporting', models.BooleanField(default=True)), - ('open_for_commenting', models.BooleanField(default=True)), - ('title', models.CharField(max_length=300)), - ('author_list', models.CharField(max_length=1000)), - ('abstract', models.TextField()), - ('arxiv_link', models.URLField(verbose_name='arXiv link (including version nr)')), - ('submission_date', models.DateField(verbose_name='date of original publication')), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('latest_activity', models.DateTimeField(default=django.utils.timezone.now)), - ('editor_in_charge', models.ForeignKey(related_name='editor_in_charge', to='scipost.Contributor', null=True, blank=True)), - ('submitted_by', models.ForeignKey(to='scipost.Contributor')), - ], - ), - migrations.CreateModel( - name='SubmissionRating', - fields=[ - ('id', models.AutoField(primary_key=True, verbose_name='ID', serialize=False, auto_created=True)), - ('clarity', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('correctness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('usefulness', models.PositiveSmallIntegerField(verbose_name=((100, '100%'), (90, '90%'), (80, '80%'), (70, '70%'), (60, '60%'), (50, '50%'), (40, '40%'), (30, '30%'), (20, '20%'), (10, '10%'), (0, '0%')))), - ('rater', models.ForeignKey(to='scipost.Contributor')), - ('submission', models.ForeignKey(to='scipost.Submission')), - ], - ), - migrations.AddField( - model_name='report', - name='submission', - field=models.ForeignKey(to='scipost.Submission'), - ), - migrations.AddField( - model_name='commentrating', - name='rater', - field=models.ForeignKey(to='scipost.Contributor'), - ), - migrations.AddField( - model_name='commentaryrating', - name='rater', - field=models.ForeignKey(to='scipost.Contributor'), - ), - migrations.AddField( - model_name='commentary', - name='vetted_by', - field=models.ForeignKey(to='scipost.Contributor', null=True, blank=True), - ), - migrations.AddField( - model_name='comment', - name='author', - field=models.ForeignKey(to='scipost.Contributor'), - ), - migrations.AddField( - model_name='comment', - name='commentary', - field=models.ForeignKey(to='scipost.Commentary', null=True, blank=True), - ), - migrations.AddField( - model_name='comment', - name='in_reply_to', - field=models.ForeignKey(to='scipost.Comment', null=True, blank=True), - ), - migrations.AddField( - model_name='comment', - name='submission', - field=models.ForeignKey(to='scipost.Submission', null=True, blank=True), - ), - migrations.AddField( - model_name='authorreplyrating', - name='rater', - field=models.ForeignKey(to='scipost.Contributor'), - ), - migrations.AddField( - model_name='authorreplyrating', - name='reply', - field=models.ForeignKey(to='scipost.AuthorReply'), - ), - migrations.AddField( - model_name='authorreply', - name='author', - field=models.ForeignKey(to='scipost.Contributor'), - ), - migrations.AddField( - model_name='authorreply', - name='commentary', - field=models.ForeignKey(to='scipost.Commentary', null=True, blank=True), - ), - migrations.AddField( - model_name='authorreply', - name='in_reply_to_comment', - field=models.ForeignKey(to='scipost.Comment', null=True, blank=True), - ), - migrations.AddField( - model_name='authorreply', - name='in_reply_to_report', - field=models.ForeignKey(to='scipost.Report', null=True, blank=True), - ), - migrations.AddField( - model_name='authorreply', - name='submission', - field=models.ForeignKey(to='scipost.Submission', null=True, blank=True), - ), - ] diff --git a/scipost/migrations/0002_auto_20151202_1831.py b/scipost/migrations/0002_auto_20151202_1831.py deleted file mode 100644 index 3e099faebbad1c438a99036c1a1d8d2cb01fd348..0000000000000000000000000000000000000000 --- a/scipost/migrations/0002_auto_20151202_1831.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('scipost', '0001_initial'), - ] - - operations = [ - migrations.RemoveField( - model_name='contributor', - name='user', - ), - migrations.AlterField( - model_name='authorreply', - name='author', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='authorreplyrating', - name='rater', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='comment', - name='author', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='commentary', - name='vetted_by', - field=models.ForeignKey(to='contributors.Contributor', blank=True, null=True), - ), - migrations.AlterField( - model_name='commentaryrating', - name='rater', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='commentrating', - name='rater', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='report', - name='author', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='report', - name='invited_by', - field=models.ForeignKey(to='contributors.Contributor', blank=True, null=True, related_name='invited_by'), - ), - migrations.AlterField( - model_name='reportrating', - name='rater', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='submission', - name='editor_in_charge', - field=models.ForeignKey(to='contributors.Contributor', blank=True, null=True, related_name='editor_in_charge'), - ), - migrations.AlterField( - model_name='submission', - name='submitted_by', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.AlterField( - model_name='submissionrating', - name='rater', - field=models.ForeignKey(to='contributors.Contributor'), - ), - migrations.DeleteModel( - name='Contributor', - ), - ] diff --git a/scipost/migrations/0003_auto_20151202_1843.py b/scipost/migrations/0003_auto_20151202_1843.py deleted file mode 100644 index fef887fbc594eb858dcd1d208f43549627840790..0000000000000000000000000000000000000000 --- a/scipost/migrations/0003_auto_20151202_1843.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('scipost', '0002_auto_20151202_1831'), - ] - - operations = [ - migrations.RemoveField( - model_name='commentary', - name='vetted_by', - ), - migrations.AlterField( - model_name='authorreply', - name='commentary', - field=models.ForeignKey(blank=True, null=True, to='commentaries.Commentary'), - ), - migrations.AlterField( - model_name='comment', - name='commentary', - field=models.ForeignKey(blank=True, null=True, to='commentaries.Commentary'), - ), - migrations.AlterField( - model_name='commentaryrating', - name='commentary', - field=models.ForeignKey(to='commentaries.Commentary'), - ), - migrations.DeleteModel( - name='Commentary', - ), - ] diff --git a/scipost/migrations/0004_auto_20151203_0922.py b/scipost/migrations/0004_auto_20151203_0922.py deleted file mode 100644 index a7675469ae5073695f06318cca2f2a81c083b92e..0000000000000000000000000000000000000000 --- a/scipost/migrations/0004_auto_20151203_0922.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('scipost', '0003_auto_20151202_1843'), - ] - - operations = [ - migrations.RemoveField( - model_name='submission', - name='editor_in_charge', - ), - migrations.RemoveField( - model_name='submission', - name='submitted_by', - ), - migrations.AlterField( - model_name='authorreply', - name='submission', - field=models.ForeignKey(blank=True, to='submissions.Submission', null=True), - ), - migrations.AlterField( - model_name='comment', - name='submission', - field=models.ForeignKey(blank=True, to='submissions.Submission', null=True), - ), - migrations.AlterField( - model_name='report', - name='submission', - field=models.ForeignKey(to='submissions.Submission'), - ), - migrations.AlterField( - model_name='submissionrating', - name='submission', - field=models.ForeignKey(to='submissions.Submission'), - ), - migrations.DeleteModel( - name='Submission', - ), - ] diff --git a/scipost/migrations/0005_auto_20151203_0928.py b/scipost/migrations/0005_auto_20151203_0928.py deleted file mode 100644 index 1fc0884760df8db66ce521d31eb28afa677a734a..0000000000000000000000000000000000000000 --- a/scipost/migrations/0005_auto_20151203_0928.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('scipost', '0004_auto_20151203_0922'), - ] - - operations = [ - migrations.RemoveField( - model_name='comment', - name='author', - ), - migrations.RemoveField( - model_name='comment', - name='commentary', - ), - migrations.RemoveField( - model_name='comment', - name='in_reply_to', - ), - migrations.RemoveField( - model_name='comment', - name='submission', - ), - migrations.AlterField( - model_name='authorreply', - name='in_reply_to_comment', - field=models.ForeignKey(null=True, to='comments.Comment', blank=True), - ), - migrations.AlterField( - model_name='commentrating', - name='comment', - field=models.ForeignKey(to='comments.Comment'), - ), - migrations.DeleteModel( - name='Comment', - ), - ] diff --git a/scipost/migrations/0006_auto_20151203_0935.py b/scipost/migrations/0006_auto_20151203_0935.py deleted file mode 100644 index afce5986463526c807efeeb0323538eab73328b7..0000000000000000000000000000000000000000 --- a/scipost/migrations/0006_auto_20151203_0935.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('scipost', '0005_auto_20151203_0928'), - ] - - operations = [ - migrations.RemoveField( - model_name='authorreplyrating', - name='rater', - ), - migrations.RemoveField( - model_name='authorreplyrating', - name='reply', - ), - migrations.RemoveField( - model_name='commentaryrating', - name='commentary', - ), - migrations.RemoveField( - model_name='commentaryrating', - name='rater', - ), - migrations.RemoveField( - model_name='commentrating', - name='comment', - ), - migrations.RemoveField( - model_name='commentrating', - name='rater', - ), - migrations.RemoveField( - model_name='reportrating', - name='rater', - ), - migrations.RemoveField( - model_name='reportrating', - name='report', - ), - migrations.RemoveField( - model_name='submissionrating', - name='rater', - ), - migrations.RemoveField( - model_name='submissionrating', - name='submission', - ), - migrations.DeleteModel( - name='AuthorReplyRating', - ), - migrations.DeleteModel( - name='CommentaryRating', - ), - migrations.DeleteModel( - name='CommentRating', - ), - migrations.DeleteModel( - name='ReportRating', - ), - migrations.DeleteModel( - name='SubmissionRating', - ), - ] diff --git a/scipost/migrations/0007_auto_20151203_0938.py b/scipost/migrations/0007_auto_20151203_0938.py deleted file mode 100644 index b407605843ed9eee3086196dc948e43fa217b7cd..0000000000000000000000000000000000000000 --- a/scipost/migrations/0007_auto_20151203_0938.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ratings', '0002_auto_20151203_0938'), - ('scipost', '0006_auto_20151203_0935'), - ] - - operations = [ - migrations.RemoveField( - model_name='report', - name='author', - ), - migrations.RemoveField( - model_name='report', - name='invited_by', - ), - migrations.RemoveField( - model_name='report', - name='submission', - ), - migrations.AlterField( - model_name='authorreply', - name='in_reply_to_report', - field=models.ForeignKey(to='reports.Report', blank=True, null=True), - ), - migrations.DeleteModel( - name='Report', - ), - ] diff --git a/scipost/migrations/0008_auto_20151203_1005.py b/scipost/migrations/0008_auto_20151203_1005.py deleted file mode 100644 index ebd30adea234802f8b709d152f478ede8e17728b..0000000000000000000000000000000000000000 --- a/scipost/migrations/0008_auto_20151203_1005.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ratings', '0003_auto_20151203_1005'), - ('scipost', '0007_auto_20151203_0938'), - ] - - operations = [ - migrations.RemoveField( - model_name='authorreply', - name='author', - ), - migrations.RemoveField( - model_name='authorreply', - name='commentary', - ), - migrations.RemoveField( - model_name='authorreply', - name='in_reply_to_comment', - ), - migrations.RemoveField( - model_name='authorreply', - name='in_reply_to_report', - ), - migrations.RemoveField( - model_name='authorreply', - name='submission', - ), - migrations.DeleteModel( - name='AuthorReply', - ), - ] diff --git a/scipostv1db.sql b/scipostv1db.sql deleted file mode 100644 index 965a59f8a3e33c36cd5055bdb6d7af993695ef18..0000000000000000000000000000000000000000 --- a/scipostv1db.sql +++ /dev/null @@ -1,2411 +0,0 @@ --- --- PostgreSQL database cluster dump --- - -SET default_transaction_read_only = off; - -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; - --- --- Roles --- - -CREATE ROLE jscaux; -ALTER ROLE jscaux WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION; -CREATE ROLE scipostv1db; -ALTER ROLE scipostv1db WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION PASSWORD 'md5f9ad7df4d8be546aef4080742bb26d2f'; - - - - - - --- --- Database creation --- - -CREATE DATABASE jscaux WITH TEMPLATE = template0 OWNER = jscaux; -CREATE DATABASE scipostv1db WITH TEMPLATE = template0 OWNER = jscaux; -REVOKE ALL ON DATABASE scipostv1db FROM PUBLIC; -REVOKE ALL ON DATABASE scipostv1db FROM jscaux; -GRANT ALL ON DATABASE scipostv1db TO jscaux; -GRANT CONNECT,TEMPORARY ON DATABASE scipostv1db TO PUBLIC; -REVOKE ALL ON DATABASE template1 FROM PUBLIC; -REVOKE ALL ON DATABASE template1 FROM jscaux; -GRANT ALL ON DATABASE template1 TO jscaux; -GRANT CONNECT ON DATABASE template1 TO PUBLIC; - - -\connect jscaux - -SET default_transaction_read_only = off; - --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SET check_function_bodies = false; -SET client_min_messages = warning; - --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - --- --- Name: public; Type: ACL; Schema: -; Owner: jscaux --- - -REVOKE ALL ON SCHEMA public FROM PUBLIC; -REVOKE ALL ON SCHEMA public FROM jscaux; -GRANT ALL ON SCHEMA public TO jscaux; -GRANT ALL ON SCHEMA public TO PUBLIC; - - --- --- PostgreSQL database dump complete --- - -\connect postgres - -SET default_transaction_read_only = off; - --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SET check_function_bodies = false; -SET client_min_messages = warning; - --- --- Name: postgres; Type: COMMENT; Schema: -; Owner: jscaux --- - -COMMENT ON DATABASE postgres IS 'default administrative connection database'; - - --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - --- --- Name: public; Type: ACL; Schema: -; Owner: jscaux --- - -REVOKE ALL ON SCHEMA public FROM PUBLIC; -REVOKE ALL ON SCHEMA public FROM jscaux; -GRANT ALL ON SCHEMA public TO jscaux; -GRANT ALL ON SCHEMA public TO PUBLIC; - - --- --- PostgreSQL database dump complete --- - -\connect scipostv1db - -SET default_transaction_read_only = off; - --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SET check_function_bodies = false; -SET client_min_messages = warning; - --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - -SET search_path = public, pg_catalog; - -SET default_tablespace = ''; - -SET default_with_oids = false; - --- --- Name: auth_group; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_group ( - id integer NOT NULL, - name character varying(80) NOT NULL -); - - -ALTER TABLE auth_group OWNER TO scipostv1db; - --- --- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_group_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_group_id_seq OWNER TO scipostv1db; - --- --- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_group_id_seq OWNED BY auth_group.id; - - --- --- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_group_permissions ( - id integer NOT NULL, - group_id integer NOT NULL, - permission_id integer NOT NULL -); - - -ALTER TABLE auth_group_permissions OWNER TO scipostv1db; - --- --- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_group_permissions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_group_permissions_id_seq OWNER TO scipostv1db; - --- --- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_group_permissions_id_seq OWNED BY auth_group_permissions.id; - - --- --- Name: auth_permission; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_permission ( - id integer NOT NULL, - name character varying(255) NOT NULL, - content_type_id integer NOT NULL, - codename character varying(100) NOT NULL -); - - -ALTER TABLE auth_permission OWNER TO scipostv1db; - --- --- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_permission_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_permission_id_seq OWNER TO scipostv1db; - --- --- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_permission_id_seq OWNED BY auth_permission.id; - - --- --- Name: auth_user; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_user ( - id integer NOT NULL, - password character varying(128) NOT NULL, - last_login timestamp with time zone, - is_superuser boolean NOT NULL, - username character varying(30) NOT NULL, - first_name character varying(30) NOT NULL, - last_name character varying(30) NOT NULL, - email character varying(254) NOT NULL, - is_staff boolean NOT NULL, - is_active boolean NOT NULL, - date_joined timestamp with time zone NOT NULL -); - - -ALTER TABLE auth_user OWNER TO scipostv1db; - --- --- Name: auth_user_groups; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_user_groups ( - id integer NOT NULL, - user_id integer NOT NULL, - group_id integer NOT NULL -); - - -ALTER TABLE auth_user_groups OWNER TO scipostv1db; - --- --- Name: auth_user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_user_groups_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_user_groups_id_seq OWNER TO scipostv1db; - --- --- Name: auth_user_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_user_groups_id_seq OWNED BY auth_user_groups.id; - - --- --- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_user_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_user_id_seq OWNER TO scipostv1db; - --- --- Name: auth_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_user_id_seq OWNED BY auth_user.id; - - --- --- Name: auth_user_user_permissions; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_user_user_permissions ( - id integer NOT NULL, - user_id integer NOT NULL, - permission_id integer NOT NULL -); - - -ALTER TABLE auth_user_user_permissions OWNER TO scipostv1db; - --- --- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_user_user_permissions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_user_user_permissions_id_seq OWNER TO scipostv1db; - --- --- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_user_user_permissions_id_seq OWNED BY auth_user_user_permissions.id; - - --- --- Name: django_admin_log; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_admin_log ( - id integer NOT NULL, - action_time timestamp with time zone NOT NULL, - object_id text, - object_repr character varying(200) NOT NULL, - action_flag smallint NOT NULL, - change_message text NOT NULL, - content_type_id integer, - user_id integer NOT NULL, - CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0)) -); - - -ALTER TABLE django_admin_log OWNER TO scipostv1db; - --- --- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE django_admin_log_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE django_admin_log_id_seq OWNER TO scipostv1db; - --- --- Name: django_admin_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE django_admin_log_id_seq OWNED BY django_admin_log.id; - - --- --- Name: django_content_type; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_content_type ( - id integer NOT NULL, - app_label character varying(100) NOT NULL, - model character varying(100) NOT NULL -); - - -ALTER TABLE django_content_type OWNER TO scipostv1db; - --- --- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE django_content_type_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE django_content_type_id_seq OWNER TO scipostv1db; - --- --- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE django_content_type_id_seq OWNED BY django_content_type.id; - - --- --- Name: django_migrations; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_migrations ( - id integer NOT NULL, - app character varying(255) NOT NULL, - name character varying(255) NOT NULL, - applied timestamp with time zone NOT NULL -); - - -ALTER TABLE django_migrations OWNER TO scipostv1db; - --- --- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE django_migrations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE django_migrations_id_seq OWNER TO scipostv1db; - --- --- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE django_migrations_id_seq OWNED BY django_migrations.id; - - --- --- Name: django_session; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_session ( - session_key character varying(40) NOT NULL, - session_data text NOT NULL, - expire_date timestamp with time zone NOT NULL -); - - -ALTER TABLE django_session OWNER TO scipostv1db; - --- --- Name: scipost_authorreply; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_authorreply ( - id integer NOT NULL, - status smallint NOT NULL, - reply_text text NOT NULL, - date_submitted timestamp with time zone NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - author_id integer NOT NULL, - in_reply_to_comment_id integer, - in_reply_to_report_id integer, - commentary_id integer, - submission_id integer -); - - -ALTER TABLE scipost_authorreply OWNER TO scipostv1db; - --- --- Name: scipost_authorreply_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_authorreply_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_authorreply_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_authorreply_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_authorreply_id_seq OWNED BY scipost_authorreply.id; - - --- --- Name: scipost_authorreplyrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_authorreplyrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - rater_id integer NOT NULL, - reply_id integer NOT NULL, - CONSTRAINT scipost_authorreplyrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_authorreplyrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_authorreplyrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_authorreplyrating OWNER TO scipostv1db; - --- --- Name: scipost_authorreplyrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_authorreplyrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_authorreplyrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_authorreplyrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_authorreplyrating_id_seq OWNED BY scipost_authorreplyrating.id; - - --- --- Name: scipost_comment; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_comment ( - id integer NOT NULL, - status smallint NOT NULL, - comment_text text NOT NULL, - date_submitted timestamp with time zone NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - author_id integer NOT NULL, - commentary_id integer, - in_reply_to_id integer, - submission_id integer -); - - -ALTER TABLE scipost_comment OWNER TO scipostv1db; - --- --- Name: scipost_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_comment_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_comment_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_comment_id_seq OWNED BY scipost_comment.id; - - --- --- Name: scipost_commentary; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_commentary ( - id integer NOT NULL, - vetted boolean NOT NULL, - type character varying(9) NOT NULL, - open_for_commenting boolean NOT NULL, - pub_title character varying(300) NOT NULL, - arxiv_link character varying(200) NOT NULL, - "pub_DOI_link" character varying(200) NOT NULL, - author_list character varying(1000) NOT NULL, - pub_date date NOT NULL, - pub_abstract text NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - latest_activity timestamp with time zone NOT NULL, - vetted_by_id integer -); - - -ALTER TABLE scipost_commentary OWNER TO scipostv1db; - --- --- Name: scipost_commentary_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_commentary_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_commentary_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_commentary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_commentary_id_seq OWNED BY scipost_commentary.id; - - --- --- Name: scipost_commentaryrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_commentaryrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - commentary_id integer NOT NULL, - rater_id integer NOT NULL, - CONSTRAINT scipost_commentaryrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_commentaryrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_commentaryrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_commentaryrating OWNER TO scipostv1db; - --- --- Name: scipost_commentaryrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_commentaryrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_commentaryrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_commentaryrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_commentaryrating_id_seq OWNED BY scipost_commentaryrating.id; - - --- --- Name: scipost_commentrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_commentrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - comment_id integer NOT NULL, - rater_id integer NOT NULL, - CONSTRAINT scipost_commentrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_commentrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_commentrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_commentrating OWNER TO scipostv1db; - --- --- Name: scipost_commentrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_commentrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_commentrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_commentrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_commentrating_id_seq OWNED BY scipost_commentrating.id; - - --- --- Name: scipost_contributor; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_contributor ( - id integer NOT NULL, - rank smallint NOT NULL, - title character varying(4) NOT NULL, - affiliation character varying(300) NOT NULL, - address character varying(1000) NOT NULL, - personalwebpage character varying(200) NOT NULL, - nr_reports smallint NOT NULL, - report_clarity_rating numeric(3,0) NOT NULL, - report_correctness_rating numeric(3,0) NOT NULL, - report_usefulness_rating numeric(3,0) NOT NULL, - nr_comments smallint NOT NULL, - comment_clarity_rating numeric(3,0) NOT NULL, - comment_correctness_rating numeric(3,0) NOT NULL, - comment_usefulness_rating numeric(3,0) NOT NULL, - user_id integer NOT NULL, - orcid_id character varying(20), - CONSTRAINT scipost_contributor_nr_comments_check CHECK ((nr_comments >= 0)), - CONSTRAINT scipost_contributor_nr_reports_check CHECK ((nr_reports >= 0)) -); - - -ALTER TABLE scipost_contributor OWNER TO scipostv1db; - --- --- Name: scipost_contributor_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_contributor_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_contributor_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_contributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_contributor_id_seq OWNED BY scipost_contributor.id; - - --- --- Name: scipost_report; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_report ( - id integer NOT NULL, - status smallint NOT NULL, - strengths text NOT NULL, - weaknesses text NOT NULL, - report text NOT NULL, - requested_changes text NOT NULL, - recommendation smallint NOT NULL, - date_invited timestamp with time zone, - date_submitted timestamp with time zone NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - author_id integer NOT NULL, - invited_by_id integer, - submission_id integer NOT NULL -); - - -ALTER TABLE scipost_report OWNER TO scipostv1db; - --- --- Name: scipost_report_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_report_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_report_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_report_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_report_id_seq OWNED BY scipost_report.id; - - --- --- Name: scipost_reportrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_reportrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - rater_id integer NOT NULL, - report_id integer NOT NULL, - CONSTRAINT scipost_reportrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_reportrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_reportrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_reportrating OWNER TO scipostv1db; - --- --- Name: scipost_reportrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_reportrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_reportrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_reportrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_reportrating_id_seq OWNED BY scipost_reportrating.id; - - --- --- Name: scipost_submission; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_submission ( - id integer NOT NULL, - vetted boolean NOT NULL, - submitted_to_journal character varying(30) NOT NULL, - status smallint NOT NULL, - open_for_reporting boolean NOT NULL, - open_for_commenting boolean NOT NULL, - title character varying(300) NOT NULL, - author_list character varying(1000) NOT NULL, - abstract text NOT NULL, - arxiv_link character varying(200) NOT NULL, - submission_date date NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - latest_activity timestamp with time zone NOT NULL, - editor_in_charge_id integer, - submitted_by_id integer NOT NULL, - specialization character varying(1) NOT NULL -); - - -ALTER TABLE scipost_submission OWNER TO scipostv1db; - --- --- Name: scipost_submission_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_submission_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_submission_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_submission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_submission_id_seq OWNED BY scipost_submission.id; - - --- --- Name: scipost_submissionrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_submissionrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - rater_id integer NOT NULL, - submission_id integer NOT NULL, - CONSTRAINT scipost_submissionrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_submissionrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_submissionrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_submissionrating OWNER TO scipostv1db; - --- --- Name: scipost_submissionrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_submissionrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_submissionrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_submissionrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_submissionrating_id_seq OWNED BY scipost_submissionrating.id; - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group ALTER COLUMN id SET DEFAULT nextval('auth_group_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group_permissions ALTER COLUMN id SET DEFAULT nextval('auth_group_permissions_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_permission ALTER COLUMN id SET DEFAULT nextval('auth_permission_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user ALTER COLUMN id SET DEFAULT nextval('auth_user_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_groups ALTER COLUMN id SET DEFAULT nextval('auth_user_groups_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_user_permissions ALTER COLUMN id SET DEFAULT nextval('auth_user_user_permissions_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_admin_log ALTER COLUMN id SET DEFAULT nextval('django_admin_log_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_content_type ALTER COLUMN id SET DEFAULT nextval('django_content_type_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_migrations ALTER COLUMN id SET DEFAULT nextval('django_migrations_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply ALTER COLUMN id SET DEFAULT nextval('scipost_authorreply_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreplyrating ALTER COLUMN id SET DEFAULT nextval('scipost_authorreplyrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment ALTER COLUMN id SET DEFAULT nextval('scipost_comment_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentary ALTER COLUMN id SET DEFAULT nextval('scipost_commentary_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentaryrating ALTER COLUMN id SET DEFAULT nextval('scipost_commentaryrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentrating ALTER COLUMN id SET DEFAULT nextval('scipost_commentrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_contributor ALTER COLUMN id SET DEFAULT nextval('scipost_contributor_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report ALTER COLUMN id SET DEFAULT nextval('scipost_report_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_reportrating ALTER COLUMN id SET DEFAULT nextval('scipost_reportrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submission ALTER COLUMN id SET DEFAULT nextval('scipost_submission_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submissionrating ALTER COLUMN id SET DEFAULT nextval('scipost_submissionrating_id_seq'::regclass); - - --- --- Data for Name: auth_group; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_group (id, name) FROM stdin; -\. - - --- --- Name: auth_group_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_group_id_seq', 1, false); - - --- --- Data for Name: auth_group_permissions; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_group_permissions (id, group_id, permission_id) FROM stdin; -\. - - --- --- Name: auth_group_permissions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_group_permissions_id_seq', 1, false); - - --- --- Data for Name: auth_permission; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_permission (id, name, content_type_id, codename) FROM stdin; -1 Can add log entry 1 add_logentry -2 Can change log entry 1 change_logentry -3 Can delete log entry 1 delete_logentry -4 Can add permission 2 add_permission -5 Can change permission 2 change_permission -6 Can delete permission 2 delete_permission -7 Can add group 3 add_group -8 Can change group 3 change_group -9 Can delete group 3 delete_group -10 Can add user 4 add_user -11 Can change user 4 change_user -12 Can delete user 4 delete_user -13 Can add content type 5 add_contenttype -14 Can change content type 5 change_contenttype -15 Can delete content type 5 delete_contenttype -16 Can add session 6 add_session -17 Can change session 6 change_session -18 Can delete session 6 delete_session -19 Can add contributor 7 add_contributor -20 Can change contributor 7 change_contributor -21 Can delete contributor 7 delete_contributor -22 Can add commentary 8 add_commentary -23 Can change commentary 8 change_commentary -24 Can delete commentary 8 delete_commentary -25 Can add commentary rating 9 add_commentaryrating -26 Can change commentary rating 9 change_commentaryrating -27 Can delete commentary rating 9 delete_commentaryrating -28 Can add submission 10 add_submission -29 Can change submission 10 change_submission -30 Can delete submission 10 delete_submission -31 Can add submission rating 11 add_submissionrating -32 Can change submission rating 11 change_submissionrating -33 Can delete submission rating 11 delete_submissionrating -34 Can add report 12 add_report -35 Can change report 12 change_report -36 Can delete report 12 delete_report -37 Can add report rating 13 add_reportrating -38 Can change report rating 13 change_reportrating -39 Can delete report rating 13 delete_reportrating -40 Can add comment 14 add_comment -41 Can change comment 14 change_comment -42 Can delete comment 14 delete_comment -43 Can add comment rating 15 add_commentrating -44 Can change comment rating 15 change_commentrating -45 Can delete comment rating 15 delete_commentrating -46 Can add author reply 16 add_authorreply -47 Can change author reply 16 change_authorreply -48 Can delete author reply 16 delete_authorreply -49 Can add author reply rating 17 add_authorreplyrating -50 Can change author reply rating 17 change_authorreplyrating -51 Can delete author reply rating 17 delete_authorreplyrating -\. - - --- --- Name: auth_permission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_permission_id_seq', 51, true); - - --- --- Data for Name: auth_user; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_user (id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined) FROM stdin; -1 pbkdf2_sha256$20000$sAETRHYQd7fU$y0Ot0wtu+RW1H1iUCMsDo+RoPBbzaz9v6A1n2LWvIyE= 2015-11-18 22:17:00.533193+01 t jscaux J.S.Caux@uva.nl t t 2015-11-18 22:16:53.171895+01 -3 pbkdf2_sha256$20000$kTJBJZ9VjNw1$02BAiUoy1S3+MlHSGUQzLZ/PHIg2Z2dnahGflzlOwMc= 2015-11-20 00:31:52.337212+01 f opera opera opera opera@opera.com f t 2015-11-20 00:26:22.258153+01 -2 pbkdf2_sha256$20000$ZnS9xtrZUd4a$ZJthVdlNh+xcsw7elxFZ0DE25kydLNaIN5BM9XrY7Ig= 2015-11-23 21:14:17.957696+01 f test1 test1 test1 test1@test1.com f t 2015-11-18 22:20:04.973505+01 -\. - - --- --- Data for Name: auth_user_groups; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_user_groups (id, user_id, group_id) FROM stdin; -\. - - --- --- Name: auth_user_groups_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_user_groups_id_seq', 1, false); - - --- --- Name: auth_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_user_id_seq', 3, true); - - --- --- Data for Name: auth_user_user_permissions; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_user_user_permissions (id, user_id, permission_id) FROM stdin; -\. - - --- --- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_user_user_permissions_id_seq', 1, false); - - --- --- Data for Name: django_admin_log; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_admin_log (id, action_time, object_id, object_repr, action_flag, change_message, content_type_id, user_id) FROM stdin; -1 2015-11-18 22:20:18.451613+01 1 test1 2 Changed rank. 7 1 -2 2015-11-18 22:32:02.420275+01 2 I like it. 3 14 1 -3 2015-11-19 00:12:09.832434+01 1 The author likes that you like it. 2 Changed commentary. 16 1 -4 2015-11-19 00:46:29.063346+01 2 This is an empty report. 2 Changed submission. 16 1 -5 2015-11-19 14:51:10.252985+01 1 Paper1 2 Changed submitted_to_journal. 10 1 -6 2015-11-21 01:01:58.091172+01 1 Paper1 2 Changed vetted. 10 1 -7 2015-11-21 01:02:12.227195+01 2 Paper2 2 Changed vetted and submitted_to_journal. 10 1 -8 2015-11-21 01:02:21.641089+01 3 submit2 2 Changed vetted. 10 1 -9 2015-11-23 00:54:50.907456+01 3 submit2 2 Changed status. 10 1 -10 2015-11-23 00:55:15.293597+01 3 submit2 2 Changed vetted. 10 1 -\. - - --- --- Name: django_admin_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('django_admin_log_id_seq', 10, true); - - --- --- Data for Name: django_content_type; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_content_type (id, app_label, model) FROM stdin; -1 admin logentry -2 auth permission -3 auth group -4 auth user -5 contenttypes contenttype -6 sessions session -7 scipost contributor -8 scipost commentary -9 scipost commentaryrating -10 scipost submission -11 scipost submissionrating -12 scipost report -13 scipost reportrating -14 scipost comment -15 scipost commentrating -16 scipost authorreply -17 scipost authorreplyrating -\. - - --- --- Name: django_content_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('django_content_type_id_seq', 17, true); - - --- --- Data for Name: django_migrations; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_migrations (id, app, name, applied) FROM stdin; -1 contenttypes 0001_initial 2015-11-18 22:16:23.523294+01 -2 auth 0001_initial 2015-11-18 22:16:23.603751+01 -3 admin 0001_initial 2015-11-18 22:16:23.630469+01 -4 contenttypes 0002_remove_content_type_name 2015-11-18 22:16:23.675043+01 -5 auth 0002_alter_permission_name_max_length 2015-11-18 22:16:23.68842+01 -6 auth 0003_alter_user_email_max_length 2015-11-18 22:16:23.703624+01 -7 auth 0004_alter_user_username_opts 2015-11-18 22:16:23.71699+01 -8 auth 0005_alter_user_last_login_null 2015-11-18 22:16:23.73192+01 -9 auth 0006_require_contenttypes_0002 2015-11-18 22:16:23.734427+01 -10 scipost 0001_initial 2015-11-18 22:16:24.187552+01 -11 sessions 0001_initial 2015-11-18 22:16:24.201602+01 -12 scipost 0002_authorreply_authorreplyrating 2015-11-18 23:45:07.861184+01 -13 scipost 0003_auto_20151119_0007 2015-11-19 00:07:06.169289+01 -14 scipost 0004_contributor_orcid_id 2015-11-19 14:23:05.078701+01 -15 scipost 0005_auto_20151119_1447 2015-11-19 14:47:19.344569+01 -16 scipost 0006_auto_20151119_1450 2015-11-19 14:50:53.812637+01 -17 scipost 0007_auto_20151120_0027 2015-11-20 00:27:10.905975+01 -18 scipost 0008_auto_20151120_0047 2015-11-20 00:47:48.545058+01 -19 scipost 0009_auto_20151120_0232 2015-11-20 02:32:54.223973+01 -20 scipost 0010_remove_submission_specialization 2015-11-20 02:35:44.039159+01 -21 scipost 0011_auto_20151120_0237 2015-11-20 02:37:38.709307+01 -22 scipost 0012_auto_20151120_0257 2015-11-20 02:57:59.495901+01 -23 scipost 0013_auto_20151120_0258 2015-11-20 02:58:12.333203+01 -24 scipost 0014_auto_20151120_0306 2015-11-20 03:06:31.202053+01 -25 scipost 0015_auto_20151121_1257 2015-11-21 12:57:13.203201+01 -\. - - --- --- Name: django_migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('django_migrations_id_seq', 25, true); - - --- --- Data for Name: django_session; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_session (session_key, session_data, expire_date) FROM stdin; -zomjmwcrpqfs8f0ymlarn7le5rm4x52o ZTAxMDRhMGFmYjRlZmJiYTc2OGUwODljMmI3NTc5N2I4NjhkOTI1Njp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9oYXNoIjoiNzI3OWJiNDlhMDY0YWRkY2FhYWU0NGZlMjQzMjk1ZDBhYWViZjk1YSIsIl9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIn0= 2015-12-02 22:17:00.535068+01 -znwofoutntdeeu9o9kj3ts7kyiegel36 NTBkNTFkM2I5Y2U0NTYzZGUxOTRhYzNiMGE4NDQ2NTJlMDRjNTA0MTp7ImNvbW1lbnRhcnlfaWQiOiIyIiwiX2F1dGhfdXNlcl9oYXNoIjoiYzk3MmFiN2RiYTkwOWY0MWZmNzlhZjEwOWJmOTNkODVlY2E0YWM0MyIsInN1Ym1pc3Npb25faWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2lkIjoiMyJ9 2015-12-05 12:59:56.883217+01 -rbi9iratet8n1d5z1ob4xnvszsbx359u YTcwMGE1N2NkYjUwNWE4Y2FhYmI3ZDkxNWRmN2IxZDc5N2NiOGRiZjp7Il9hdXRoX3VzZXJfaWQiOiIyIiwiX2F1dGhfdXNlcl9oYXNoIjoiYWY0NTk2OGQ4N2QzNTA3NzgwYWE2NGUxNGJjZTMzOWFjYzcxNGNhYyIsIl9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIn0= 2015-12-07 21:14:17.972148+01 -\. - - --- --- Data for Name: scipost_authorreply; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_authorreply (id, status, reply_text, date_submitted, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, author_id, in_reply_to_comment_id, in_reply_to_report_id, commentary_id, submission_id) FROM stdin; -1 1 The author likes that you like it. 2015-11-18 23:45:11+01 0 0 0 0 1 1 \N 1 \N -2 1 This is an empty report. 2015-11-19 00:36:26+01 0 0 0 0 1 \N 1 \N 1 -3 1 What a useful comment for the authors. 2015-11-19 00:47:53.331291+01 0 0 0 0 1 4 \N \N 1 -4 1 We indeed like it very much. 2015-11-19 02:23:25.052279+01 0 0 0 0 1 1 \N 1 \N -5 1 We await your second comment. 2015-11-19 02:27:05.752186+01 0 0 0 0 1 4 \N \N 1 -6 1 Thanks for liking it. 2015-11-21 12:59:25.784166+01 0 0 0 0 2 3 \N 1 \N -7 0 Thanks 2015-11-24 09:30:34.707145+01 0 0 0 0 1 6 \N 2 \N -\. - - --- --- Name: scipost_authorreply_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_authorreply_id_seq', 7, true); - - --- --- Data for Name: scipost_authorreplyrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_authorreplyrating (id, clarity, correctness, usefulness, rater_id, reply_id) FROM stdin; -\. - - --- --- Name: scipost_authorreplyrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_authorreplyrating_id_seq', 1, false); - - --- --- Data for Name: scipost_comment; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_comment (id, status, comment_text, date_submitted, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, author_id, commentary_id, in_reply_to_id, submission_id) FROM stdin; -1 1 I like it. 2015-11-18 22:31:05.057914+01 0 0 0 0 1 1 \N \N -3 1 Another contributor likes it. 2015-11-19 00:18:52.336946+01 0 0 0 0 1 1 1 \N -4 1 First comment. 2015-11-19 00:46:52.07598+01 0 0 0 0 1 \N \N 1 -5 1 Yeah, let's see your second comment. 2015-11-19 02:31:50.429428+01 0 0 0 0 1 \N 4 1 -7 1 What an uninteresting paper who would even read this?????? 2015-11-23 20:22:40.659499+01 0 0 0 0 1 2 \N \N -6 1 This is a great paper. 2015-11-21 12:55:19.73328+01 1 10 0 0 2 2 \N \N -\. - - --- --- Name: scipost_comment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_comment_id_seq', 7, true); - - --- --- Data for Name: scipost_commentary; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_commentary (id, vetted, type, open_for_commenting, pub_title, arxiv_link, "pub_DOI_link", author_list, pub_date, pub_abstract, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, latest_activity, vetted_by_id) FROM stdin; -2 t published t Complete Generalized Gibbs Ensemble in an interacting Theory http://arxiv.org/abs/1507.02993v2 http://dx.doi.org/10.1103/PhysRevLett.115.157201 Enej Ilievski, Jacopo De Nardis, Bram Wouters, Jean-Sebastien Caux, Fabian H. L. Essler, Tomaz Prosen 2015-07-10 In integrable many-particle systems, it is widely believed that the stationary state reached at late times after a quantum quench can be described by a generalized Gibbs ensemble (GGE) constructed from their extensive number of conserved charges. A crucial issue is then to identify a complete set of these charges, enabling the GGE to provide exact steady state predictions. Here we solve this long-standing problem for the case of the spin-1/2 Heisenberg chain by explicitly constructing a GGE which uniquely fixes the macrostate describing the stationary behaviour after a general quantum quench. A crucial ingredient in our method, which readily generalizes to other integrable models, are recently discovered quasi-local charges. As a test, we reproduce the exact post-quench steady state of the Neel quench problem obtained previously by means of the Quench Action method. 0 0 0 0 2015-11-19 13:05:55.381085+01 \N -1 t preprint t Reunion probabilities of N one-dimensional random walkers with mixed boundary conditions http://arxiv.org/abs/1311.0654v1 Isaac Pérez Castillo, Thomas Dupic 2013-04-11 In this work we extend the results of the reunion probability of $N$ one-dimensional random walkers to include mixed boundary conditions between their trajectories. The level of the mixture is controlled by a parameter $c$, which can be varied from $c=0$ (independent walkers) to $c\\to\\infty$ (vicious walkers). The expressions are derived by using Quantum Mechanics formalism (QMf) which allows us to map this problem into a Lieb-Liniger gas (LLg) of $N$ one-dimensional particles. We use Bethe ansatz and Gaudin's conjecture to obtain the normalized wave-functions and use this information to construct the propagator. As it is well-known, depending on the boundary conditions imposed at the endpoints of a line segment, the statistics of the maximum heights of the reunited trajectories have some connections with different ensembles in Random Matrix Theory (RMT). Here we seek to extend those results and consider four models: absorbing, periodic, reflecting, and mixed. In all four cases, the probability that the maximum height is less or equal than $L$ takes the form $F_N(L)=A_N\\sum_{k\\in\\Omega_{B}}\\int Dz e^{-\\sum_{j=1}^Nk_j^2+G_N(k)-\\sum_{j,\\ell=1}^N z_jV_{j\\ell}(k)\\overline{z}_\\ell}$, where $A_N$ is a normalization constant, $G_N(k)$ and $V_{j\\ell}(k)$ depend on the type of boundary condition, and $\\Omega_{B}$ is the solution set of quasi-momenta $k$ obeying the Bethe equations for that particular boundary condition. 1 90 100 100 2015-11-18 22:22:22.507372+01 \N -3 t published t Probing the Excitations of a Lieb-Liniger Gas from Weak to Strong Coupling http://arxiv.org/abs/1505.08152 http://dx.doi.org/10.1103/PhysRevLett.115.085301 Florian Meinert, Milosz Panfil, Manfred J. Mark, Katharina Lauber, Jean-Sébastien Caux, Hanns-Christoph Nägerl 2015-08-15 We probe the excitation spectrum of an ultracold one-dimensional Bose gas of Cesium atoms with repulsive contact interaction that we tune from the weakly to the strongly interacting regime via a magnetic Feshbach resonance. The dynamical structure factor, experimentally obtained using Bragg spectroscopy, is compared to integrability-based calculations valid at arbitrary interactions and finite temperatures. Our results unequivocally underly the fact that hole-like excitations, which have no counterpart in higher dimensions, actively shape the dynamical response of the gas. 0 0 0 0 2015-11-21 12:50:11.999992+01 \N -\. - - --- --- Name: scipost_commentary_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_commentary_id_seq', 3, true); - - --- --- Data for Name: scipost_commentaryrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_commentaryrating (id, clarity, correctness, usefulness, commentary_id, rater_id) FROM stdin; -1 90 100 100 1 1 -\. - - --- --- Name: scipost_commentaryrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_commentaryrating_id_seq', 1, true); - - --- --- Data for Name: scipost_commentrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_commentrating (id, clarity, correctness, usefulness, comment_id, rater_id) FROM stdin; -1 10 0 0 6 1 -\. - - --- --- Name: scipost_commentrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_commentrating_id_seq', 1, true); - - --- --- Data for Name: scipost_contributor; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_contributor (id, rank, title, affiliation, address, personalwebpage, nr_reports, report_clarity_rating, report_correctness_rating, report_usefulness_rating, nr_comments, comment_clarity_rating, comment_correctness_rating, comment_usefulness_rating, user_id, orcid_id) FROM stdin; -1 4 PR test1 1 0 0 0 5 0 0 0 2 -2 1 PR opera opera 1 0 0 0 1 10 0 0 3 -\. - - --- --- Name: scipost_contributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_contributor_id_seq', 2, true); - - --- --- Data for Name: scipost_report; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_report (id, status, strengths, weaknesses, report, requested_changes, recommendation, date_invited, date_submitted, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, author_id, invited_by_id, submission_id) FROM stdin; -1 1 Strong. Weak. Readable. Rewrite. 1 \N 2015-11-18 22:41:30.836513+01 0 0 0 0 1 \N 1 -2 1 Hey Ho Tiddly Bum 1 \N 2015-11-21 12:59:56.875594+01 0 0 0 0 2 \N 1 -\. - - --- --- Name: scipost_report_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_report_id_seq', 2, true); - - --- --- Data for Name: scipost_reportrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_reportrating (id, clarity, correctness, usefulness, rater_id, report_id) FROM stdin; -\. - - --- --- Name: scipost_reportrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_reportrating_id_seq', 1, false); - - --- --- Data for Name: scipost_submission; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_submission (id, vetted, submitted_to_journal, status, open_for_reporting, open_for_commenting, title, author_list, abstract, arxiv_link, submission_date, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, latest_activity, editor_in_charge_id, submitted_by_id, specialization) FROM stdin; -1 t SciPost Physics Letters 1 t t Paper1 Author1 Abstract1 http://arxiv.org/paper1 2015-11-18 1 70 50 30 2015-11-18 22:39:46+01 1 1 A -2 t SciPost Physics X 1 t t Paper2 Auth2 Abs2 http://arxiv.org/1511.9999v1 2015-11-19 0 0 0 0 2015-11-19 15:08:59+01 1 1 A -3 t SciPost Physics Letters 1 t t submit2 auth2 abs2 http://arxiv.org/paper2.com 2015-11-20 0 0 0 0 2015-11-20 00:49:44+01 1 2 A -4 t SciPost Physics X 1 t t Some Weird Stuff Maxim Caux This is a very weird text that no one wrote http://arxiv.org/maxv1 2015-11-23 0 0 0 0 2015-11-23 20:17:55.690899+01 1 1 G -\. - - --- --- Name: scipost_submission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_submission_id_seq', 4, true); - - --- --- Data for Name: scipost_submissionrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_submissionrating (id, clarity, correctness, usefulness, rater_id, submission_id) FROM stdin; -1 70 50 30 1 1 -\. - - --- --- Name: scipost_submissionrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_submissionrating_id_seq', 1, true); - - --- --- Name: auth_group_name_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group - ADD CONSTRAINT auth_group_name_key UNIQUE (name); - - --- --- Name: auth_group_permissions_group_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group_permissions_group_id_permission_id_key UNIQUE (group_id, permission_id); - - --- --- Name: auth_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group_permissions_pkey PRIMARY KEY (id); - - --- --- Name: auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group - ADD CONSTRAINT auth_group_pkey PRIMARY KEY (id); - - --- --- Name: auth_permission_content_type_id_codename_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_permission - ADD CONSTRAINT auth_permission_content_type_id_codename_key UNIQUE (content_type_id, codename); - - --- --- Name: auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_permission - ADD CONSTRAINT auth_permission_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_groups_user_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_user_id_group_id_key UNIQUE (user_id, group_id); - - --- --- Name: auth_user_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user - ADD CONSTRAINT auth_user_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_user_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user_user_permissions_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_user_permissions_user_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user_user_permissions_user_id_permission_id_key UNIQUE (user_id, permission_id); - - --- --- Name: auth_user_username_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user - ADD CONSTRAINT auth_user_username_key UNIQUE (username); - - --- --- Name: django_admin_log_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_admin_log - ADD CONSTRAINT django_admin_log_pkey PRIMARY KEY (id); - - --- --- Name: django_content_type_app_label_7d32226aaf54ec25_uniq; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_content_type - ADD CONSTRAINT django_content_type_app_label_7d32226aaf54ec25_uniq UNIQUE (app_label, model); - - --- --- Name: django_content_type_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_content_type - ADD CONSTRAINT django_content_type_pkey PRIMARY KEY (id); - - --- --- Name: django_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_migrations - ADD CONSTRAINT django_migrations_pkey PRIMARY KEY (id); - - --- --- Name: django_session_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_session - ADD CONSTRAINT django_session_pkey PRIMARY KEY (session_key); - - --- --- Name: scipost_authorreply_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_authorreply_pkey PRIMARY KEY (id); - - --- --- Name: scipost_authorreplyrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_authorreplyrating - ADD CONSTRAINT scipost_authorreplyrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_comment_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_comment_pkey PRIMARY KEY (id); - - --- --- Name: scipost_commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_commentary - ADD CONSTRAINT scipost_commentary_pkey PRIMARY KEY (id); - - --- --- Name: scipost_commentaryrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_commentaryrating - ADD CONSTRAINT scipost_commentaryrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_commentrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_commentrating - ADD CONSTRAINT scipost_commentrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_contributor_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_contributor - ADD CONSTRAINT scipost_contributor_pkey PRIMARY KEY (id); - - --- --- Name: scipost_contributor_user_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_contributor - ADD CONSTRAINT scipost_contributor_user_id_key UNIQUE (user_id); - - --- --- Name: scipost_report_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipost_report_pkey PRIMARY KEY (id); - - --- --- Name: scipost_reportrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_reportrating - ADD CONSTRAINT scipost_reportrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_submission_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_submission - ADD CONSTRAINT scipost_submission_pkey PRIMARY KEY (id); - - --- --- Name: scipost_submissionrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_submissionrating - ADD CONSTRAINT scipost_submissionrating_pkey PRIMARY KEY (id); - - --- --- Name: auth_group_name_243fb6146d665317_like; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_group_name_243fb6146d665317_like ON auth_group USING btree (name varchar_pattern_ops); - - --- --- Name: auth_group_permissions_0e939a4f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_group_permissions_0e939a4f ON auth_group_permissions USING btree (group_id); - - --- --- Name: auth_group_permissions_8373b171; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_group_permissions_8373b171 ON auth_group_permissions USING btree (permission_id); - - --- --- Name: auth_permission_417f1b1c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_permission_417f1b1c ON auth_permission USING btree (content_type_id); - - --- --- Name: auth_user_groups_0e939a4f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_groups_0e939a4f ON auth_user_groups USING btree (group_id); - - --- --- Name: auth_user_groups_e8701ad4; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_groups_e8701ad4 ON auth_user_groups USING btree (user_id); - - --- --- Name: auth_user_user_permissions_8373b171; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_user_permissions_8373b171 ON auth_user_user_permissions USING btree (permission_id); - - --- --- Name: auth_user_user_permissions_e8701ad4; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_user_permissions_e8701ad4 ON auth_user_user_permissions USING btree (user_id); - - --- --- Name: auth_user_username_12b13d01a12d892a_like; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_username_12b13d01a12d892a_like ON auth_user USING btree (username varchar_pattern_ops); - - --- --- Name: django_admin_log_417f1b1c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_admin_log_417f1b1c ON django_admin_log USING btree (content_type_id); - - --- --- Name: django_admin_log_e8701ad4; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_admin_log_e8701ad4 ON django_admin_log USING btree (user_id); - - --- --- Name: django_session_de54fa62; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_session_de54fa62 ON django_session USING btree (expire_date); - - --- --- Name: django_session_session_key_3207e98caaef7623_like; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_session_session_key_3207e98caaef7623_like ON django_session USING btree (session_key varchar_pattern_ops); - - --- --- Name: scipost_authorreply_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_1dd9cfcc ON scipost_authorreply USING btree (submission_id); - - --- --- Name: scipost_authorreply_4f331e2f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_4f331e2f ON scipost_authorreply USING btree (author_id); - - --- --- Name: scipost_authorreply_c229db37; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_c229db37 ON scipost_authorreply USING btree (commentary_id); - - --- --- Name: scipost_authorreply_daece9cb; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_daece9cb ON scipost_authorreply USING btree (in_reply_to_report_id); - - --- --- Name: scipost_authorreply_f72f5890; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_f72f5890 ON scipost_authorreply USING btree (in_reply_to_comment_id); - - --- --- Name: scipost_authorreplyrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreplyrating_9e4fc8b5 ON scipost_authorreplyrating USING btree (rater_id); - - --- --- Name: scipost_authorreplyrating_bbc2f847; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreplyrating_bbc2f847 ON scipost_authorreplyrating USING btree (reply_id); - - --- --- Name: scipost_comment_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_1dd9cfcc ON scipost_comment USING btree (submission_id); - - --- --- Name: scipost_comment_48c25820; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_48c25820 ON scipost_comment USING btree (in_reply_to_id); - - --- --- Name: scipost_comment_4f331e2f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_4f331e2f ON scipost_comment USING btree (author_id); - - --- --- Name: scipost_comment_c229db37; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_c229db37 ON scipost_comment USING btree (commentary_id); - - --- --- Name: scipost_commentary_47ed100c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentary_47ed100c ON scipost_commentary USING btree (vetted_by_id); - - --- --- Name: scipost_commentaryrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentaryrating_9e4fc8b5 ON scipost_commentaryrating USING btree (rater_id); - - --- --- Name: scipost_commentaryrating_c229db37; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentaryrating_c229db37 ON scipost_commentaryrating USING btree (commentary_id); - - --- --- Name: scipost_commentrating_69b97d17; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentrating_69b97d17 ON scipost_commentrating USING btree (comment_id); - - --- --- Name: scipost_commentrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentrating_9e4fc8b5 ON scipost_commentrating USING btree (rater_id); - - --- --- Name: scipost_report_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_report_1dd9cfcc ON scipost_report USING btree (submission_id); - - --- --- Name: scipost_report_36fc3d93; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_report_36fc3d93 ON scipost_report USING btree (invited_by_id); - - --- --- Name: scipost_report_4f331e2f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_report_4f331e2f ON scipost_report USING btree (author_id); - - --- --- Name: scipost_reportrating_6f78b20c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_reportrating_6f78b20c ON scipost_reportrating USING btree (report_id); - - --- --- Name: scipost_reportrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_reportrating_9e4fc8b5 ON scipost_reportrating USING btree (rater_id); - - --- --- Name: scipost_submission_31174c9a; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submission_31174c9a ON scipost_submission USING btree (submitted_by_id); - - --- --- Name: scipost_submission_57927b23; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submission_57927b23 ON scipost_submission USING btree (editor_in_charge_id); - - --- --- Name: scipost_submissionrating_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submissionrating_1dd9cfcc ON scipost_submissionrating USING btree (submission_id); - - --- --- Name: scipost_submissionrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submissionrating_9e4fc8b5 ON scipost_submissionrating USING btree (rater_id); - - --- --- Name: auth_content_type_id_75e6ae31abbebaa1_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_permission - ADD CONSTRAINT auth_content_type_id_75e6ae31abbebaa1_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_group_permissio_group_id_69b6a92c126620cb_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group_permissio_group_id_69b6a92c126620cb_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_group_permission_id_2af58f1bb854fe46_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group_permission_id_2af58f1bb854fe46_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user_groups_group_id_39824aa73dda5bf9_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_group_id_39824aa73dda5bf9_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user_groups_user_id_3a9940ca2e89ec5e_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_user_id_3a9940ca2e89ec5e_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user_u_permission_id_10a7622450db5f0_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user_u_permission_id_10a7622450db5f0_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user_user_permiss_user_id_220d186eb3650ce4_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user_user_permiss_user_id_220d186eb3650ce4_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: djan_content_type_id_38dfec5f7e30a719_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_admin_log - ADD CONSTRAINT djan_content_type_id_38dfec5f7e30a719_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: django_admin_log_user_id_33c983bf8f6cef9d_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_admin_log - ADD CONSTRAINT django_admin_log_user_id_33c983bf8f6cef9d_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: editor_in_charge_id_1eb081c7672a0361_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submission - ADD CONSTRAINT editor_in_charge_id_1eb081c7672a0361_fk_scipost_contributor_id FOREIGN KEY (editor_in_charge_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: s_in_reply_to_comment_id_5526ba288d2cf230_fk_scipost_comment_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT s_in_reply_to_comment_id_5526ba288d2cf230_fk_scipost_comment_id FOREIGN KEY (in_reply_to_comment_id) REFERENCES scipost_comment(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: sci_in_reply_to_report_id_35020fceaf0ce21b_fk_scipost_report_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT sci_in_reply_to_report_id_35020fceaf0ce21b_fk_scipost_report_id FOREIGN KEY (in_reply_to_report_id) REFERENCES scipost_report(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scip_submitted_by_id_7bbfb6be40460915_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submission - ADD CONSTRAINT scip_submitted_by_id_7bbfb6be40460915_fk_scipost_contributor_id FOREIGN KEY (submitted_by_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_au_author_id_657d535d36cde5fa_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_au_author_id_657d535d36cde5fa_fk_scipost_contributor_id FOREIGN KEY (author_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_aut_rater_id_3d6d1f3ad90a3373_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreplyrating - ADD CONSTRAINT scipost_aut_rater_id_3d6d1f3ad90a3373_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_aut_reply_id_593ae18c455584a3_fk_scipost_authorreply_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreplyrating - ADD CONSTRAINT scipost_aut_reply_id_593ae18c455584a3_fk_scipost_authorreply_id FOREIGN KEY (reply_id) REFERENCES scipost_authorreply(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_co_author_id_62ca0aa2e14d9fd6_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_co_author_id_62ca0aa2e14d9fd6_fk_scipost_contributor_id FOREIGN KEY (author_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_co_in_reply_to_id_75273a6da02eef7_fk_scipost_comment_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_co_in_reply_to_id_75273a6da02eef7_fk_scipost_comment_id FOREIGN KEY (in_reply_to_id) REFERENCES scipost_comment(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_com_rater_id_60ba20d670ed92b7_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentaryrating - ADD CONSTRAINT scipost_com_rater_id_60ba20d670ed92b7_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_com_rater_id_730aba9e953e3613_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentrating - ADD CONSTRAINT scipost_com_rater_id_730aba9e953e3613_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_comme_comment_id_3b4c673c45c7c489_fk_scipost_comment_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentrating - ADD CONSTRAINT scipost_comme_comment_id_3b4c673c45c7c489_fk_scipost_comment_id FOREIGN KEY (comment_id) REFERENCES scipost_comment(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_commentary_id_102714de1fc19fd4_fk_scipost_commentary_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentaryrating - ADD CONSTRAINT scipost_commentary_id_102714de1fc19fd4_fk_scipost_commentary_id FOREIGN KEY (commentary_id) REFERENCES scipost_commentary(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_commentary_id_696b33666be9f0e3_fk_scipost_commentary_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_commentary_id_696b33666be9f0e3_fk_scipost_commentary_id FOREIGN KEY (commentary_id) REFERENCES scipost_commentary(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_commentary_id_7ade0adc5b2cf289_fk_scipost_commentary_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_commentary_id_7ade0adc5b2cf289_fk_scipost_commentary_id FOREIGN KEY (commentary_id) REFERENCES scipost_commentary(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_contributor_user_id_12351d0620355a18_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_contributor - ADD CONSTRAINT scipost_contributor_user_id_12351d0620355a18_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_invited_by_id_2e66021a58f3780_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipost_invited_by_id_2e66021a58f3780_fk_scipost_contributor_id FOREIGN KEY (invited_by_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_re_author_id_73e385a0cc8767c1_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipost_re_author_id_73e385a0cc8767c1_fk_scipost_contributor_id FOREIGN KEY (author_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_rep_rater_id_7800cb5fe19f767c_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_reportrating - ADD CONSTRAINT scipost_rep_rater_id_7800cb5fe19f767c_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_reportr_report_id_3ee2d0b9644132c4_fk_scipost_report_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_reportrating - ADD CONSTRAINT scipost_reportr_report_id_3ee2d0b9644132c4_fk_scipost_report_id FOREIGN KEY (report_id) REFERENCES scipost_report(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_sub_rater_id_2bff2d3c7c72e9be_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submissionrating - ADD CONSTRAINT scipost_sub_rater_id_2bff2d3c7c72e9be_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_182bea1067cb77fa_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_submission_id_182bea1067cb77fa_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_28020adff681e20e_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submissionrating - ADD CONSTRAINT scipost_submission_id_28020adff681e20e_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_3a5af0a95f64c3df_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipost_submission_id_3a5af0a95f64c3df_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_5b3c14653298ba3c_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_submission_id_5b3c14653298ba3c_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_vetted_by_id_3e36f35ed29f72f7_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentary - ADD CONSTRAINT scipost_vetted_by_id_3e36f35ed29f72f7_fk_scipost_contributor_id FOREIGN KEY (vetted_by_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: public; Type: ACL; Schema: -; Owner: jscaux --- - -REVOKE ALL ON SCHEMA public FROM PUBLIC; -REVOKE ALL ON SCHEMA public FROM jscaux; -GRANT ALL ON SCHEMA public TO jscaux; -GRANT ALL ON SCHEMA public TO PUBLIC; - - --- --- PostgreSQL database dump complete --- - -\connect template1 - -SET default_transaction_read_only = off; - --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SET check_function_bodies = false; -SET client_min_messages = warning; - --- --- Name: template1; Type: COMMENT; Schema: -; Owner: jscaux --- - -COMMENT ON DATABASE template1 IS 'default template for new databases'; - - --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - --- --- Name: public; Type: ACL; Schema: -; Owner: jscaux --- - -REVOKE ALL ON SCHEMA public FROM PUBLIC; -REVOKE ALL ON SCHEMA public FROM jscaux; -GRANT ALL ON SCHEMA public TO jscaux; -GRANT ALL ON SCHEMA public TO PUBLIC; - - --- --- PostgreSQL database dump complete --- - --- --- PostgreSQL database cluster dump complete --- - diff --git a/scipostv1db_20151128.sql b/scipostv1db_20151128.sql deleted file mode 100644 index 62ae3e810878d98f9c699b65c264598e5c2be98d..0000000000000000000000000000000000000000 --- a/scipostv1db_20151128.sql +++ /dev/null @@ -1,2181 +0,0 @@ --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SET check_function_bodies = false; -SET client_min_messages = warning; - --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - -SET search_path = public, pg_catalog; - -SET default_tablespace = ''; - -SET default_with_oids = false; - --- --- Name: auth_group; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_group ( - id integer NOT NULL, - name character varying(80) NOT NULL -); - - -ALTER TABLE auth_group OWNER TO scipostv1db; - --- --- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_group_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_group_id_seq OWNER TO scipostv1db; - --- --- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_group_id_seq OWNED BY auth_group.id; - - --- --- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_group_permissions ( - id integer NOT NULL, - group_id integer NOT NULL, - permission_id integer NOT NULL -); - - -ALTER TABLE auth_group_permissions OWNER TO scipostv1db; - --- --- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_group_permissions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_group_permissions_id_seq OWNER TO scipostv1db; - --- --- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_group_permissions_id_seq OWNED BY auth_group_permissions.id; - - --- --- Name: auth_permission; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_permission ( - id integer NOT NULL, - name character varying(255) NOT NULL, - content_type_id integer NOT NULL, - codename character varying(100) NOT NULL -); - - -ALTER TABLE auth_permission OWNER TO scipostv1db; - --- --- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_permission_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_permission_id_seq OWNER TO scipostv1db; - --- --- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_permission_id_seq OWNED BY auth_permission.id; - - --- --- Name: auth_user; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_user ( - id integer NOT NULL, - password character varying(128) NOT NULL, - last_login timestamp with time zone, - is_superuser boolean NOT NULL, - username character varying(30) NOT NULL, - first_name character varying(30) NOT NULL, - last_name character varying(30) NOT NULL, - email character varying(254) NOT NULL, - is_staff boolean NOT NULL, - is_active boolean NOT NULL, - date_joined timestamp with time zone NOT NULL -); - - -ALTER TABLE auth_user OWNER TO scipostv1db; - --- --- Name: auth_user_groups; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_user_groups ( - id integer NOT NULL, - user_id integer NOT NULL, - group_id integer NOT NULL -); - - -ALTER TABLE auth_user_groups OWNER TO scipostv1db; - --- --- Name: auth_user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_user_groups_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_user_groups_id_seq OWNER TO scipostv1db; - --- --- Name: auth_user_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_user_groups_id_seq OWNED BY auth_user_groups.id; - - --- --- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_user_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_user_id_seq OWNER TO scipostv1db; - --- --- Name: auth_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_user_id_seq OWNED BY auth_user.id; - - --- --- Name: auth_user_user_permissions; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE auth_user_user_permissions ( - id integer NOT NULL, - user_id integer NOT NULL, - permission_id integer NOT NULL -); - - -ALTER TABLE auth_user_user_permissions OWNER TO scipostv1db; - --- --- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE auth_user_user_permissions_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE auth_user_user_permissions_id_seq OWNER TO scipostv1db; - --- --- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE auth_user_user_permissions_id_seq OWNED BY auth_user_user_permissions.id; - - --- --- Name: django_admin_log; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_admin_log ( - id integer NOT NULL, - action_time timestamp with time zone NOT NULL, - object_id text, - object_repr character varying(200) NOT NULL, - action_flag smallint NOT NULL, - change_message text NOT NULL, - content_type_id integer, - user_id integer NOT NULL, - CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0)) -); - - -ALTER TABLE django_admin_log OWNER TO scipostv1db; - --- --- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE django_admin_log_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE django_admin_log_id_seq OWNER TO scipostv1db; - --- --- Name: django_admin_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE django_admin_log_id_seq OWNED BY django_admin_log.id; - - --- --- Name: django_content_type; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_content_type ( - id integer NOT NULL, - app_label character varying(100) NOT NULL, - model character varying(100) NOT NULL -); - - -ALTER TABLE django_content_type OWNER TO scipostv1db; - --- --- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE django_content_type_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE django_content_type_id_seq OWNER TO scipostv1db; - --- --- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE django_content_type_id_seq OWNED BY django_content_type.id; - - --- --- Name: django_migrations; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_migrations ( - id integer NOT NULL, - app character varying(255) NOT NULL, - name character varying(255) NOT NULL, - applied timestamp with time zone NOT NULL -); - - -ALTER TABLE django_migrations OWNER TO scipostv1db; - --- --- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE django_migrations_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE django_migrations_id_seq OWNER TO scipostv1db; - --- --- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE django_migrations_id_seq OWNED BY django_migrations.id; - - --- --- Name: django_session; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE django_session ( - session_key character varying(40) NOT NULL, - session_data text NOT NULL, - expire_date timestamp with time zone NOT NULL -); - - -ALTER TABLE django_session OWNER TO scipostv1db; - --- --- Name: scipost_authorreply; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_authorreply ( - id integer NOT NULL, - status smallint NOT NULL, - reply_text text NOT NULL, - date_submitted timestamp with time zone NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - author_id integer NOT NULL, - commentary_id integer, - in_reply_to_comment_id integer, - in_reply_to_report_id integer, - submission_id integer -); - - -ALTER TABLE scipost_authorreply OWNER TO scipostv1db; - --- --- Name: scipost_authorreply_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_authorreply_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_authorreply_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_authorreply_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_authorreply_id_seq OWNED BY scipost_authorreply.id; - - --- --- Name: scipost_authorreplyrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_authorreplyrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - rater_id integer NOT NULL, - reply_id integer NOT NULL, - CONSTRAINT scipost_authorreplyrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_authorreplyrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_authorreplyrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_authorreplyrating OWNER TO scipostv1db; - --- --- Name: scipost_authorreplyrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_authorreplyrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_authorreplyrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_authorreplyrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_authorreplyrating_id_seq OWNED BY scipost_authorreplyrating.id; - - --- --- Name: scipost_comment; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_comment ( - id integer NOT NULL, - status smallint NOT NULL, - comment_text text NOT NULL, - date_submitted timestamp with time zone NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - author_id integer NOT NULL, - commentary_id integer, - in_reply_to_id integer, - submission_id integer -); - - -ALTER TABLE scipost_comment OWNER TO scipostv1db; - --- --- Name: scipost_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_comment_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_comment_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_comment_id_seq OWNED BY scipost_comment.id; - - --- --- Name: scipost_commentary; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_commentary ( - id integer NOT NULL, - vetted boolean NOT NULL, - type character varying(9) NOT NULL, - open_for_commenting boolean NOT NULL, - pub_title character varying(300) NOT NULL, - arxiv_link character varying(200) NOT NULL, - "pub_DOI_link" character varying(200) NOT NULL, - author_list character varying(1000) NOT NULL, - pub_date date NOT NULL, - pub_abstract text NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - latest_activity timestamp with time zone NOT NULL, - vetted_by_id integer -); - - -ALTER TABLE scipost_commentary OWNER TO scipostv1db; - --- --- Name: scipost_commentary_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_commentary_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_commentary_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_commentary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_commentary_id_seq OWNED BY scipost_commentary.id; - - --- --- Name: scipost_commentaryrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_commentaryrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - commentary_id integer NOT NULL, - rater_id integer NOT NULL, - CONSTRAINT scipost_commentaryrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_commentaryrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_commentaryrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_commentaryrating OWNER TO scipostv1db; - --- --- Name: scipost_commentaryrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_commentaryrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_commentaryrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_commentaryrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_commentaryrating_id_seq OWNED BY scipost_commentaryrating.id; - - --- --- Name: scipost_commentrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_commentrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - comment_id integer NOT NULL, - rater_id integer NOT NULL, - CONSTRAINT scipost_commentrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_commentrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_commentrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_commentrating OWNER TO scipostv1db; - --- --- Name: scipost_commentrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_commentrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_commentrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_commentrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_commentrating_id_seq OWNED BY scipost_commentrating.id; - - --- --- Name: scipost_contributor; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_contributor ( - id integer NOT NULL, - rank smallint NOT NULL, - title character varying(4) NOT NULL, - orcid_id character varying(20), - affiliation character varying(300) NOT NULL, - address character varying(1000) NOT NULL, - personalwebpage character varying(200) NOT NULL, - nr_reports smallint NOT NULL, - report_clarity_rating numeric(3,0) NOT NULL, - report_correctness_rating numeric(3,0) NOT NULL, - report_usefulness_rating numeric(3,0) NOT NULL, - nr_comments smallint NOT NULL, - comment_clarity_rating numeric(3,0) NOT NULL, - comment_correctness_rating numeric(3,0) NOT NULL, - comment_usefulness_rating numeric(3,0) NOT NULL, - user_id integer NOT NULL, - CONSTRAINT scipost_contributor_nr_comments_check CHECK ((nr_comments >= 0)), - CONSTRAINT scipost_contributor_nr_reports_check CHECK ((nr_reports >= 0)) -); - - -ALTER TABLE scipost_contributor OWNER TO scipostv1db; - --- --- Name: scipost_contributor_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_contributor_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_contributor_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_contributor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_contributor_id_seq OWNED BY scipost_contributor.id; - - --- --- Name: scipost_report; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_report ( - id integer NOT NULL, - status smallint NOT NULL, - qualification smallint NOT NULL, - strengths text NOT NULL, - weaknesses text NOT NULL, - report text NOT NULL, - requested_changes text NOT NULL, - recommendation smallint NOT NULL, - date_invited timestamp with time zone, - date_submitted timestamp with time zone NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - author_id integer NOT NULL, - invited_by_id integer, - submission_id integer NOT NULL, - CONSTRAINT scipost_report_qualification_check CHECK ((qualification >= 0)) -); - - -ALTER TABLE scipost_report OWNER TO scipostv1db; - --- --- Name: scipost_report_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_report_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_report_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_report_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_report_id_seq OWNED BY scipost_report.id; - - --- --- Name: scipost_reportrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_reportrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - rater_id integer NOT NULL, - report_id integer NOT NULL, - CONSTRAINT scipost_reportrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_reportrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_reportrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_reportrating OWNER TO scipostv1db; - --- --- Name: scipost_reportrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_reportrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_reportrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_reportrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_reportrating_id_seq OWNED BY scipost_reportrating.id; - - --- --- Name: scipost_submission; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_submission ( - id integer NOT NULL, - vetted boolean NOT NULL, - submitted_to_journal character varying(30) NOT NULL, - domain character varying(1) NOT NULL, - specialization character varying(1) NOT NULL, - status smallint NOT NULL, - open_for_reporting boolean NOT NULL, - open_for_commenting boolean NOT NULL, - title character varying(300) NOT NULL, - author_list character varying(1000) NOT NULL, - abstract text NOT NULL, - arxiv_link character varying(200) NOT NULL, - submission_date date NOT NULL, - nr_ratings integer NOT NULL, - clarity_rating numeric(3,0) NOT NULL, - correctness_rating numeric(3,0) NOT NULL, - usefulness_rating numeric(3,0) NOT NULL, - latest_activity timestamp with time zone NOT NULL, - editor_in_charge_id integer, - submitted_by_id integer NOT NULL -); - - -ALTER TABLE scipost_submission OWNER TO scipostv1db; - --- --- Name: scipost_submission_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_submission_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_submission_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_submission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_submission_id_seq OWNED BY scipost_submission.id; - - --- --- Name: scipost_submissionrating; Type: TABLE; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE TABLE scipost_submissionrating ( - id integer NOT NULL, - clarity smallint NOT NULL, - correctness smallint NOT NULL, - usefulness smallint NOT NULL, - rater_id integer NOT NULL, - submission_id integer NOT NULL, - CONSTRAINT scipost_submissionrating_clarity_check CHECK ((clarity >= 0)), - CONSTRAINT scipost_submissionrating_correctness_check CHECK ((correctness >= 0)), - CONSTRAINT scipost_submissionrating_usefulness_check CHECK ((usefulness >= 0)) -); - - -ALTER TABLE scipost_submissionrating OWNER TO scipostv1db; - --- --- Name: scipost_submissionrating_id_seq; Type: SEQUENCE; Schema: public; Owner: scipostv1db --- - -CREATE SEQUENCE scipost_submissionrating_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE scipost_submissionrating_id_seq OWNER TO scipostv1db; - --- --- Name: scipost_submissionrating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: scipostv1db --- - -ALTER SEQUENCE scipost_submissionrating_id_seq OWNED BY scipost_submissionrating.id; - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group ALTER COLUMN id SET DEFAULT nextval('auth_group_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group_permissions ALTER COLUMN id SET DEFAULT nextval('auth_group_permissions_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_permission ALTER COLUMN id SET DEFAULT nextval('auth_permission_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user ALTER COLUMN id SET DEFAULT nextval('auth_user_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_groups ALTER COLUMN id SET DEFAULT nextval('auth_user_groups_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_user_permissions ALTER COLUMN id SET DEFAULT nextval('auth_user_user_permissions_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_admin_log ALTER COLUMN id SET DEFAULT nextval('django_admin_log_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_content_type ALTER COLUMN id SET DEFAULT nextval('django_content_type_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_migrations ALTER COLUMN id SET DEFAULT nextval('django_migrations_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply ALTER COLUMN id SET DEFAULT nextval('scipost_authorreply_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreplyrating ALTER COLUMN id SET DEFAULT nextval('scipost_authorreplyrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment ALTER COLUMN id SET DEFAULT nextval('scipost_comment_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentary ALTER COLUMN id SET DEFAULT nextval('scipost_commentary_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentaryrating ALTER COLUMN id SET DEFAULT nextval('scipost_commentaryrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentrating ALTER COLUMN id SET DEFAULT nextval('scipost_commentrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_contributor ALTER COLUMN id SET DEFAULT nextval('scipost_contributor_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report ALTER COLUMN id SET DEFAULT nextval('scipost_report_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_reportrating ALTER COLUMN id SET DEFAULT nextval('scipost_reportrating_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submission ALTER COLUMN id SET DEFAULT nextval('scipost_submission_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submissionrating ALTER COLUMN id SET DEFAULT nextval('scipost_submissionrating_id_seq'::regclass); - - --- --- Data for Name: auth_group; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_group (id, name) FROM stdin; -\. - - --- --- Name: auth_group_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_group_id_seq', 1, false); - - --- --- Data for Name: auth_group_permissions; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_group_permissions (id, group_id, permission_id) FROM stdin; -\. - - --- --- Name: auth_group_permissions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_group_permissions_id_seq', 1, false); - - --- --- Data for Name: auth_permission; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_permission (id, name, content_type_id, codename) FROM stdin; -1 Can add log entry 1 add_logentry -2 Can change log entry 1 change_logentry -3 Can delete log entry 1 delete_logentry -4 Can add permission 2 add_permission -5 Can change permission 2 change_permission -6 Can delete permission 2 delete_permission -7 Can add group 3 add_group -8 Can change group 3 change_group -9 Can delete group 3 delete_group -10 Can add user 4 add_user -11 Can change user 4 change_user -12 Can delete user 4 delete_user -13 Can add content type 5 add_contenttype -14 Can change content type 5 change_contenttype -15 Can delete content type 5 delete_contenttype -16 Can add session 6 add_session -17 Can change session 6 change_session -18 Can delete session 6 delete_session -19 Can add contributor 7 add_contributor -20 Can change contributor 7 change_contributor -21 Can delete contributor 7 delete_contributor -22 Can add commentary 8 add_commentary -23 Can change commentary 8 change_commentary -24 Can delete commentary 8 delete_commentary -25 Can add commentary rating 9 add_commentaryrating -26 Can change commentary rating 9 change_commentaryrating -27 Can delete commentary rating 9 delete_commentaryrating -28 Can add submission 10 add_submission -29 Can change submission 10 change_submission -30 Can delete submission 10 delete_submission -31 Can add submission rating 11 add_submissionrating -32 Can change submission rating 11 change_submissionrating -33 Can delete submission rating 11 delete_submissionrating -34 Can add report 12 add_report -35 Can change report 12 change_report -36 Can delete report 12 delete_report -37 Can add report rating 13 add_reportrating -38 Can change report rating 13 change_reportrating -39 Can delete report rating 13 delete_reportrating -40 Can add comment 14 add_comment -41 Can change comment 14 change_comment -42 Can delete comment 14 delete_comment -43 Can add comment rating 15 add_commentrating -44 Can change comment rating 15 change_commentrating -45 Can delete comment rating 15 delete_commentrating -46 Can add author reply 16 add_authorreply -47 Can change author reply 16 change_authorreply -48 Can delete author reply 16 delete_authorreply -49 Can add author reply rating 17 add_authorreplyrating -50 Can change author reply rating 17 change_authorreplyrating -51 Can delete author reply rating 17 delete_authorreplyrating -\. - - --- --- Name: auth_permission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_permission_id_seq', 51, true); - - --- --- Data for Name: auth_user; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_user (id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined) FROM stdin; -1 pbkdf2_sha256$20000$LDBGVXD440Se$bYbOPlWlxbp/hMJa+QJjfnS7MDJKduKksXm5kv2xHR0= 2015-11-28 17:27:03.013026+01 t jscaux J.S.Caux@uva.nl t t 2015-11-28 17:22:40.479645+01 -2 pbkdf2_sha256$20000$c543GuXwlo5c$I2BMZVk6iEt3/8BaiMtL8YswmgWdIuTAiOMj3Q3/+sE= 2015-11-28 17:27:50.299663+01 f test1 test1 test1 test1@test1.com f t 2015-11-28 17:24:22.148379+01 -\. - - --- --- Data for Name: auth_user_groups; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_user_groups (id, user_id, group_id) FROM stdin; -\. - - --- --- Name: auth_user_groups_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_user_groups_id_seq', 1, false); - - --- --- Name: auth_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_user_id_seq', 2, true); - - --- --- Data for Name: auth_user_user_permissions; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY auth_user_user_permissions (id, user_id, permission_id) FROM stdin; -\. - - --- --- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('auth_user_user_permissions_id_seq', 1, false); - - --- --- Data for Name: django_admin_log; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_admin_log (id, action_time, object_id, object_repr, action_flag, change_message, content_type_id, user_id) FROM stdin; -1 2015-11-28 17:27:15.205328+01 1 test1 2 Changed rank. 7 1 -\. - - --- --- Name: django_admin_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('django_admin_log_id_seq', 1, true); - - --- --- Data for Name: django_content_type; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_content_type (id, app_label, model) FROM stdin; -1 admin logentry -2 auth permission -3 auth group -4 auth user -5 contenttypes contenttype -6 sessions session -7 scipost contributor -8 scipost commentary -9 scipost commentaryrating -10 scipost submission -11 scipost submissionrating -12 scipost report -13 scipost reportrating -14 scipost comment -15 scipost commentrating -16 scipost authorreply -17 scipost authorreplyrating -\. - - --- --- Name: django_content_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('django_content_type_id_seq', 17, true); - - --- --- Data for Name: django_migrations; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_migrations (id, app, name, applied) FROM stdin; -1 contenttypes 0001_initial 2015-11-28 17:21:47.301639+01 -2 auth 0001_initial 2015-11-28 17:21:47.381343+01 -3 admin 0001_initial 2015-11-28 17:21:47.411744+01 -4 contenttypes 0002_remove_content_type_name 2015-11-28 17:21:47.455104+01 -5 auth 0002_alter_permission_name_max_length 2015-11-28 17:21:47.468536+01 -6 auth 0003_alter_user_email_max_length 2015-11-28 17:21:47.482805+01 -7 auth 0004_alter_user_username_opts 2015-11-28 17:21:47.49891+01 -8 auth 0005_alter_user_last_login_null 2015-11-28 17:21:47.513072+01 -9 auth 0006_require_contenttypes_0002 2015-11-28 17:21:47.514916+01 -10 scipost 0001_initial 2015-11-28 17:21:48.377002+01 -11 sessions 0001_initial 2015-11-28 17:21:48.391046+01 -\. - - --- --- Name: django_migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('django_migrations_id_seq', 11, true); - - --- --- Data for Name: django_session; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY django_session (session_key, session_data, expire_date) FROM stdin; -bqfpa7e4rz3zlq223nm2xkhvab9nnf9g NTM0YTZhODY3MDU3MTA4OWU1ZTQ4ZDM0ZjQ2YjkwZDc1Njc1YzdjNjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4MDdjMjk4MzI1OGU5Mzg0MGQzYWRhZGUwMjQ1MTFhOTJiMGQzZDZmIn0= 2015-12-12 17:22:44.429354+01 -ilq7lrdyz96qixjfk2pujuag6rzkdl1t NTM0YTZhODY3MDU3MTA4OWU1ZTQ4ZDM0ZjQ2YjkwZDc1Njc1YzdjNjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4MDdjMjk4MzI1OGU5Mzg0MGQzYWRhZGUwMjQ1MTFhOTJiMGQzZDZmIn0= 2015-12-12 17:22:46.042299+01 -kos0ovvi3y15iyxvplim6pj1j15l2f0m NTM0YTZhODY3MDU3MTA4OWU1ZTQ4ZDM0ZjQ2YjkwZDc1Njc1YzdjNjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4MDdjMjk4MzI1OGU5Mzg0MGQzYWRhZGUwMjQ1MTFhOTJiMGQzZDZmIn0= 2015-12-12 17:22:54.787021+01 -hfyfhl51dvvbp5bd1kq36d8umm7un5o2 NTM0YTZhODY3MDU3MTA4OWU1ZTQ4ZDM0ZjQ2YjkwZDc1Njc1YzdjNjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4MDdjMjk4MzI1OGU5Mzg0MGQzYWRhZGUwMjQ1MTFhOTJiMGQzZDZmIn0= 2015-12-12 17:23:27.202816+01 -bllo7smxcsu39qaar1cyscuynozg3yir NTM0YTZhODY3MDU3MTA4OWU1ZTQ4ZDM0ZjQ2YjkwZDc1Njc1YzdjNjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4MDdjMjk4MzI1OGU5Mzg0MGQzYWRhZGUwMjQ1MTFhOTJiMGQzZDZmIn0= 2015-12-12 17:24:30.85311+01 -99i0qiw53bd6bmmd8g6m7x0p7sjwm0sa NTM0YTZhODY3MDU3MTA4OWU1ZTQ4ZDM0ZjQ2YjkwZDc1Njc1YzdjNjp7Il9hdXRoX3VzZXJfaWQiOiIxIiwiX2F1dGhfdXNlcl9iYWNrZW5kIjoiZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5kcy5Nb2RlbEJhY2tlbmQiLCJfYXV0aF91c2VyX2hhc2giOiI4MDdjMjk4MzI1OGU5Mzg0MGQzYWRhZGUwMjQ1MTFhOTJiMGQzZDZmIn0= 2015-12-12 17:25:12.812666+01 -gs8ayemn0kafvaf7bym8qolbmid0mxcw MTY1YmU2YzE1MDA2MDYxZjkxNjNkZTlkNzFjNGJlN2JlMjQ2ZjNkZjp7Il9hdXRoX3VzZXJfaGFzaCI6IjgwN2MyOTgzMjU4ZTkzODQwZDNhZGFkZTAyNDUxMWE5MmIwZDNkNmYiLCJfYXV0aF91c2VyX2lkIjoiMSIsIl9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIn0= 2015-12-12 17:26:48.588465+01 -mazqhvw19ut4xqxwoc280mv9rre2y2lj MTY1YmU2YzE1MDA2MDYxZjkxNjNkZTlkNzFjNGJlN2JlMjQ2ZjNkZjp7Il9hdXRoX3VzZXJfaGFzaCI6IjgwN2MyOTgzMjU4ZTkzODQwZDNhZGFkZTAyNDUxMWE5MmIwZDNkNmYiLCJfYXV0aF91c2VyX2lkIjoiMSIsIl9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIn0= 2015-12-12 17:26:49.968733+01 -8jt464tmnpxz5log7k9ad4lqttk0l8ic MTY1YmU2YzE1MDA2MDYxZjkxNjNkZTlkNzFjNGJlN2JlMjQ2ZjNkZjp7Il9hdXRoX3VzZXJfaGFzaCI6IjgwN2MyOTgzMjU4ZTkzODQwZDNhZGFkZTAyNDUxMWE5MmIwZDNkNmYiLCJfYXV0aF91c2VyX2lkIjoiMSIsIl9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIn0= 2015-12-12 17:27:03.014813+01 -pemzblq3od8kt2t91ltbj8fh6918t8ql ZGYyM2E3YmZhOTA1MThmOWZhMzFkMTVjMTI1MzUwOTYwNzY4N2JjYjp7Il9hdXRoX3VzZXJfaGFzaCI6IjBmMTM2MDlmNTg1YjhiYjdkZGIyZTE0YWJlYzE3MzZjNzZjZWJlNjkiLCJfYXV0aF91c2VyX2lkIjoiMiIsIl9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIn0= 2015-12-12 17:27:50.314962+01 -\. - - --- --- Data for Name: scipost_authorreply; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_authorreply (id, status, reply_text, date_submitted, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, author_id, commentary_id, in_reply_to_comment_id, in_reply_to_report_id, submission_id) FROM stdin; -\. - - --- --- Name: scipost_authorreply_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_authorreply_id_seq', 1, false); - - --- --- Data for Name: scipost_authorreplyrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_authorreplyrating (id, clarity, correctness, usefulness, rater_id, reply_id) FROM stdin; -\. - - --- --- Name: scipost_authorreplyrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_authorreplyrating_id_seq', 1, false); - - --- --- Data for Name: scipost_comment; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_comment (id, status, comment_text, date_submitted, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, author_id, commentary_id, in_reply_to_id, submission_id) FROM stdin; -\. - - --- --- Name: scipost_comment_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_comment_id_seq', 1, false); - - --- --- Data for Name: scipost_commentary; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_commentary (id, vetted, type, open_for_commenting, pub_title, arxiv_link, "pub_DOI_link", author_list, pub_date, pub_abstract, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, latest_activity, vetted_by_id) FROM stdin; -\. - - --- --- Name: scipost_commentary_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_commentary_id_seq', 1, false); - - --- --- Data for Name: scipost_commentaryrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_commentaryrating (id, clarity, correctness, usefulness, commentary_id, rater_id) FROM stdin; -\. - - --- --- Name: scipost_commentaryrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_commentaryrating_id_seq', 1, false); - - --- --- Data for Name: scipost_commentrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_commentrating (id, clarity, correctness, usefulness, comment_id, rater_id) FROM stdin; -\. - - --- --- Name: scipost_commentrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_commentrating_id_seq', 1, false); - - --- --- Data for Name: scipost_contributor; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_contributor (id, rank, title, orcid_id, affiliation, address, personalwebpage, nr_reports, report_clarity_rating, report_correctness_rating, report_usefulness_rating, nr_comments, comment_clarity_rating, comment_correctness_rating, comment_usefulness_rating, user_id) FROM stdin; -1 5 PR test1 0 0 0 0 0 0 0 0 2 -\. - - --- --- Name: scipost_contributor_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_contributor_id_seq', 1, true); - - --- --- Data for Name: scipost_report; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_report (id, status, qualification, strengths, weaknesses, report, requested_changes, recommendation, date_invited, date_submitted, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, author_id, invited_by_id, submission_id) FROM stdin; -\. - - --- --- Name: scipost_report_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_report_id_seq', 1, false); - - --- --- Data for Name: scipost_reportrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_reportrating (id, clarity, correctness, usefulness, rater_id, report_id) FROM stdin; -\. - - --- --- Name: scipost_reportrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_reportrating_id_seq', 1, false); - - --- --- Data for Name: scipost_submission; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_submission (id, vetted, submitted_to_journal, domain, specialization, status, open_for_reporting, open_for_commenting, title, author_list, abstract, arxiv_link, submission_date, nr_ratings, clarity_rating, correctness_rating, usefulness_rating, latest_activity, editor_in_charge_id, submitted_by_id) FROM stdin; -\. - - --- --- Name: scipost_submission_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_submission_id_seq', 1, false); - - --- --- Data for Name: scipost_submissionrating; Type: TABLE DATA; Schema: public; Owner: scipostv1db --- - -COPY scipost_submissionrating (id, clarity, correctness, usefulness, rater_id, submission_id) FROM stdin; -\. - - --- --- Name: scipost_submissionrating_id_seq; Type: SEQUENCE SET; Schema: public; Owner: scipostv1db --- - -SELECT pg_catalog.setval('scipost_submissionrating_id_seq', 1, false); - - --- --- Name: auth_group_name_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group - ADD CONSTRAINT auth_group_name_key UNIQUE (name); - - --- --- Name: auth_group_permissions_group_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group_permissions_group_id_permission_id_key UNIQUE (group_id, permission_id); - - --- --- Name: auth_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group_permissions_pkey PRIMARY KEY (id); - - --- --- Name: auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_group - ADD CONSTRAINT auth_group_pkey PRIMARY KEY (id); - - --- --- Name: auth_permission_content_type_id_codename_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_permission - ADD CONSTRAINT auth_permission_content_type_id_codename_key UNIQUE (content_type_id, codename); - - --- --- Name: auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_permission - ADD CONSTRAINT auth_permission_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_groups_user_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_user_id_group_id_key UNIQUE (user_id, group_id); - - --- --- Name: auth_user_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user - ADD CONSTRAINT auth_user_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_user_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user_user_permissions_pkey PRIMARY KEY (id); - - --- --- Name: auth_user_user_permissions_user_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user_user_permissions_user_id_permission_id_key UNIQUE (user_id, permission_id); - - --- --- Name: auth_user_username_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY auth_user - ADD CONSTRAINT auth_user_username_key UNIQUE (username); - - --- --- Name: django_admin_log_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_admin_log - ADD CONSTRAINT django_admin_log_pkey PRIMARY KEY (id); - - --- --- Name: django_content_type_app_label_561bc37e5a6ea6ea_uniq; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_content_type - ADD CONSTRAINT django_content_type_app_label_561bc37e5a6ea6ea_uniq UNIQUE (app_label, model); - - --- --- Name: django_content_type_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_content_type - ADD CONSTRAINT django_content_type_pkey PRIMARY KEY (id); - - --- --- Name: django_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_migrations - ADD CONSTRAINT django_migrations_pkey PRIMARY KEY (id); - - --- --- Name: django_session_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY django_session - ADD CONSTRAINT django_session_pkey PRIMARY KEY (session_key); - - --- --- Name: scipost_authorreply_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_authorreply_pkey PRIMARY KEY (id); - - --- --- Name: scipost_authorreplyrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_authorreplyrating - ADD CONSTRAINT scipost_authorreplyrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_comment_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_comment_pkey PRIMARY KEY (id); - - --- --- Name: scipost_commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_commentary - ADD CONSTRAINT scipost_commentary_pkey PRIMARY KEY (id); - - --- --- Name: scipost_commentaryrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_commentaryrating - ADD CONSTRAINT scipost_commentaryrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_commentrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_commentrating - ADD CONSTRAINT scipost_commentrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_contributor_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_contributor - ADD CONSTRAINT scipost_contributor_pkey PRIMARY KEY (id); - - --- --- Name: scipost_contributor_user_id_key; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_contributor - ADD CONSTRAINT scipost_contributor_user_id_key UNIQUE (user_id); - - --- --- Name: scipost_report_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipost_report_pkey PRIMARY KEY (id); - - --- --- Name: scipost_reportrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_reportrating - ADD CONSTRAINT scipost_reportrating_pkey PRIMARY KEY (id); - - --- --- Name: scipost_submission_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_submission - ADD CONSTRAINT scipost_submission_pkey PRIMARY KEY (id); - - --- --- Name: scipost_submissionrating_pkey; Type: CONSTRAINT; Schema: public; Owner: scipostv1db; Tablespace: --- - -ALTER TABLE ONLY scipost_submissionrating - ADD CONSTRAINT scipost_submissionrating_pkey PRIMARY KEY (id); - - --- --- Name: auth_group_name_22300af083d055a4_like; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_group_name_22300af083d055a4_like ON auth_group USING btree (name varchar_pattern_ops); - - --- --- Name: auth_group_permissions_0e939a4f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_group_permissions_0e939a4f ON auth_group_permissions USING btree (group_id); - - --- --- Name: auth_group_permissions_8373b171; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_group_permissions_8373b171 ON auth_group_permissions USING btree (permission_id); - - --- --- Name: auth_permission_417f1b1c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_permission_417f1b1c ON auth_permission USING btree (content_type_id); - - --- --- Name: auth_user_groups_0e939a4f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_groups_0e939a4f ON auth_user_groups USING btree (group_id); - - --- --- Name: auth_user_groups_e8701ad4; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_groups_e8701ad4 ON auth_user_groups USING btree (user_id); - - --- --- Name: auth_user_user_permissions_8373b171; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_user_permissions_8373b171 ON auth_user_user_permissions USING btree (permission_id); - - --- --- Name: auth_user_user_permissions_e8701ad4; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_user_permissions_e8701ad4 ON auth_user_user_permissions USING btree (user_id); - - --- --- Name: auth_user_username_3eb7429306e522bc_like; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX auth_user_username_3eb7429306e522bc_like ON auth_user USING btree (username varchar_pattern_ops); - - --- --- Name: django_admin_log_417f1b1c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_admin_log_417f1b1c ON django_admin_log USING btree (content_type_id); - - --- --- Name: django_admin_log_e8701ad4; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_admin_log_e8701ad4 ON django_admin_log USING btree (user_id); - - --- --- Name: django_session_de54fa62; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_session_de54fa62 ON django_session USING btree (expire_date); - - --- --- Name: django_session_session_key_23a16fd1e8e217c5_like; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX django_session_session_key_23a16fd1e8e217c5_like ON django_session USING btree (session_key varchar_pattern_ops); - - --- --- Name: scipost_authorreply_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_1dd9cfcc ON scipost_authorreply USING btree (submission_id); - - --- --- Name: scipost_authorreply_4f331e2f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_4f331e2f ON scipost_authorreply USING btree (author_id); - - --- --- Name: scipost_authorreply_c229db37; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_c229db37 ON scipost_authorreply USING btree (commentary_id); - - --- --- Name: scipost_authorreply_daece9cb; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_daece9cb ON scipost_authorreply USING btree (in_reply_to_report_id); - - --- --- Name: scipost_authorreply_f72f5890; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreply_f72f5890 ON scipost_authorreply USING btree (in_reply_to_comment_id); - - --- --- Name: scipost_authorreplyrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreplyrating_9e4fc8b5 ON scipost_authorreplyrating USING btree (rater_id); - - --- --- Name: scipost_authorreplyrating_bbc2f847; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_authorreplyrating_bbc2f847 ON scipost_authorreplyrating USING btree (reply_id); - - --- --- Name: scipost_comment_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_1dd9cfcc ON scipost_comment USING btree (submission_id); - - --- --- Name: scipost_comment_48c25820; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_48c25820 ON scipost_comment USING btree (in_reply_to_id); - - --- --- Name: scipost_comment_4f331e2f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_4f331e2f ON scipost_comment USING btree (author_id); - - --- --- Name: scipost_comment_c229db37; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_comment_c229db37 ON scipost_comment USING btree (commentary_id); - - --- --- Name: scipost_commentary_47ed100c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentary_47ed100c ON scipost_commentary USING btree (vetted_by_id); - - --- --- Name: scipost_commentaryrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentaryrating_9e4fc8b5 ON scipost_commentaryrating USING btree (rater_id); - - --- --- Name: scipost_commentaryrating_c229db37; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentaryrating_c229db37 ON scipost_commentaryrating USING btree (commentary_id); - - --- --- Name: scipost_commentrating_69b97d17; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentrating_69b97d17 ON scipost_commentrating USING btree (comment_id); - - --- --- Name: scipost_commentrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_commentrating_9e4fc8b5 ON scipost_commentrating USING btree (rater_id); - - --- --- Name: scipost_report_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_report_1dd9cfcc ON scipost_report USING btree (submission_id); - - --- --- Name: scipost_report_36fc3d93; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_report_36fc3d93 ON scipost_report USING btree (invited_by_id); - - --- --- Name: scipost_report_4f331e2f; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_report_4f331e2f ON scipost_report USING btree (author_id); - - --- --- Name: scipost_reportrating_6f78b20c; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_reportrating_6f78b20c ON scipost_reportrating USING btree (report_id); - - --- --- Name: scipost_reportrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_reportrating_9e4fc8b5 ON scipost_reportrating USING btree (rater_id); - - --- --- Name: scipost_submission_31174c9a; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submission_31174c9a ON scipost_submission USING btree (submitted_by_id); - - --- --- Name: scipost_submission_57927b23; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submission_57927b23 ON scipost_submission USING btree (editor_in_charge_id); - - --- --- Name: scipost_submissionrating_1dd9cfcc; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submissionrating_1dd9cfcc ON scipost_submissionrating USING btree (submission_id); - - --- --- Name: scipost_submissionrating_9e4fc8b5; Type: INDEX; Schema: public; Owner: scipostv1db; Tablespace: --- - -CREATE INDEX scipost_submissionrating_9e4fc8b5 ON scipost_submissionrating USING btree (rater_id); - - --- --- Name: auth_content_type_id_19a11dbb5cf64c6d_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_permission - ADD CONSTRAINT auth_content_type_id_19a11dbb5cf64c6d_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_group__permission_id_13f0192df91ada6_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group__permission_id_13f0192df91ada6_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_group_permissio_group_id_44476e2990c289c6_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_group_permissions - ADD CONSTRAINT auth_group_permissio_group_id_44476e2990c289c6_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user__permission_id_225af1e608c39bb2_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user__permission_id_225af1e608c39bb2_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user_groups_group_id_96e306a34b1fdde_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_group_id_96e306a34b1fdde_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user_groups_user_id_38eb384af7fe4ced_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_groups - ADD CONSTRAINT auth_user_groups_user_id_38eb384af7fe4ced_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: auth_user_user_permiss_user_id_19782b049daf6389_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY auth_user_user_permissions - ADD CONSTRAINT auth_user_user_permiss_user_id_19782b049daf6389_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: djan_content_type_id_7a0682f1585530f1_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_admin_log - ADD CONSTRAINT djan_content_type_id_7a0682f1585530f1_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: django_admin_log_user_id_51c000be9563163e_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY django_admin_log - ADD CONSTRAINT django_admin_log_user_id_51c000be9563163e_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: editor_in_charge_id_678a982160ec7de7_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submission - ADD CONSTRAINT editor_in_charge_id_678a982160ec7de7_fk_scipost_contributor_id FOREIGN KEY (editor_in_charge_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: s_in_reply_to_comment_id_3ab38b881664c5fd_fk_scipost_comment_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT s_in_reply_to_comment_id_3ab38b881664c5fd_fk_scipost_comment_id FOREIGN KEY (in_reply_to_comment_id) REFERENCES scipost_comment(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: sci_in_reply_to_report_id_353d61599149b4eb_fk_scipost_report_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT sci_in_reply_to_report_id_353d61599149b4eb_fk_scipost_report_id FOREIGN KEY (in_reply_to_report_id) REFERENCES scipost_report(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scip_submitted_by_id_49da9cc433ba31f9_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submission - ADD CONSTRAINT scip_submitted_by_id_49da9cc433ba31f9_fk_scipost_contributor_id FOREIGN KEY (submitted_by_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipos_invited_by_id_5f7fd99819bf5dbd_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipos_invited_by_id_5f7fd99819bf5dbd_fk_scipost_contributor_id FOREIGN KEY (invited_by_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_au_author_id_7ff889415a3cca77_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_au_author_id_7ff889415a3cca77_fk_scipost_contributor_id FOREIGN KEY (author_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_aut_rater_id_5f46bad82eac1f28_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreplyrating - ADD CONSTRAINT scipost_aut_rater_id_5f46bad82eac1f28_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_aut_reply_id_6510820350c6f14a_fk_scipost_authorreply_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreplyrating - ADD CONSTRAINT scipost_aut_reply_id_6510820350c6f14a_fk_scipost_authorreply_id FOREIGN KEY (reply_id) REFERENCES scipost_authorreply(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_c_in_reply_to_id_44f130e7bf022adb_fk_scipost_comment_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_c_in_reply_to_id_44f130e7bf022adb_fk_scipost_comment_id FOREIGN KEY (in_reply_to_id) REFERENCES scipost_comment(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_co_author_id_452160c42696cf47_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_co_author_id_452160c42696cf47_fk_scipost_contributor_id FOREIGN KEY (author_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_com_rater_id_1c565adb8105debc_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentrating - ADD CONSTRAINT scipost_com_rater_id_1c565adb8105debc_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_com_rater_id_6b0e2ce2e0ad8566_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentaryrating - ADD CONSTRAINT scipost_com_rater_id_6b0e2ce2e0ad8566_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_comme_comment_id_5171e8e38a3b993d_fk_scipost_comment_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentrating - ADD CONSTRAINT scipost_comme_comment_id_5171e8e38a3b993d_fk_scipost_comment_id FOREIGN KEY (comment_id) REFERENCES scipost_comment(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_commentary_id_14778ec647655bd8_fk_scipost_commentary_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_commentary_id_14778ec647655bd8_fk_scipost_commentary_id FOREIGN KEY (commentary_id) REFERENCES scipost_commentary(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_commentary_id_6dfefeacac103e0f_fk_scipost_commentary_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentaryrating - ADD CONSTRAINT scipost_commentary_id_6dfefeacac103e0f_fk_scipost_commentary_id FOREIGN KEY (commentary_id) REFERENCES scipost_commentary(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_commentary_id_78decc5c7941ce0a_fk_scipost_commentary_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_commentary_id_78decc5c7941ce0a_fk_scipost_commentary_id FOREIGN KEY (commentary_id) REFERENCES scipost_commentary(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_contributor_user_id_27b45ca802c0d3bc_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_contributor - ADD CONSTRAINT scipost_contributor_user_id_27b45ca802c0d3bc_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_re_author_id_277db53186193bb8_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipost_re_author_id_277db53186193bb8_fk_scipost_contributor_id FOREIGN KEY (author_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_repo_rater_id_9460c7f3c896053_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_reportrating - ADD CONSTRAINT scipost_repo_rater_id_9460c7f3c896053_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_reportr_report_id_34a74ecc347d1c85_fk_scipost_report_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_reportrating - ADD CONSTRAINT scipost_reportr_report_id_34a74ecc347d1c85_fk_scipost_report_id FOREIGN KEY (report_id) REFERENCES scipost_report(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_sub_rater_id_54c21bbfd8bef5a8_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submissionrating - ADD CONSTRAINT scipost_sub_rater_id_54c21bbfd8bef5a8_fk_scipost_contributor_id FOREIGN KEY (rater_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_17789c9872948123_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_submissionrating - ADD CONSTRAINT scipost_submission_id_17789c9872948123_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_461b50e51cabda75_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_report - ADD CONSTRAINT scipost_submission_id_461b50e51cabda75_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_5f122cf066fa25ea_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_authorreply - ADD CONSTRAINT scipost_submission_id_5f122cf066fa25ea_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_submission_id_7559e84a23dbf4b4_fk_scipost_submission_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_comment - ADD CONSTRAINT scipost_submission_id_7559e84a23dbf4b4_fk_scipost_submission_id FOREIGN KEY (submission_id) REFERENCES scipost_submission(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: scipost_vetted_by_id_1ddf21ddd805a269_fk_scipost_contributor_id; Type: FK CONSTRAINT; Schema: public; Owner: scipostv1db --- - -ALTER TABLE ONLY scipost_commentary - ADD CONSTRAINT scipost_vetted_by_id_1ddf21ddd805a269_fk_scipost_contributor_id FOREIGN KEY (vetted_by_id) REFERENCES scipost_contributor(id) DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: public; Type: ACL; Schema: -; Owner: jscaux --- - -REVOKE ALL ON SCHEMA public FROM PUBLIC; -REVOKE ALL ON SCHEMA public FROM jscaux; -GRANT ALL ON SCHEMA public TO jscaux; -GRANT ALL ON SCHEMA public TO PUBLIC; - - --- --- PostgreSQL database dump complete --- - diff --git a/submissions/migrations/0001_initial.py b/submissions/migrations/0001_initial.py index bdde7545bfaa90394e55556037fd3746012f579f..cd2dae6ac37d296744cbb78fcf8fd5940d0214b5 100644 --- a/submissions/migrations/0001_initial.py +++ b/submissions/migrations/0001_initial.py @@ -15,10 +15,10 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Submission', fields=[ - ('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)), + ('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)), ('vetted', models.BooleanField(default=False)), - ('submitted_to_journal', models.CharField(max_length=30, choices=[('SciPost Physics Select', 'SciPost Physics Select'), ('SciPost Physics Letters', 'SciPost Physics Letters'), ('SciPost Physics X', 'SciPost Physics X (cross-division)'), ('SciPost Physics', 'SciPost Physics (Experimental, Theoretical and Computational)')])), - ('domain', models.CharField(default='E', max_length=1, choices=[('E', 'Experimental'), ('T', 'Theoretical'), ('C', 'Computational')])), + ('submitted_to_journal', models.CharField(max_length=30, choices=[('SciPost Physics Select', 'SciPost Physics Select'), ('SciPost Physics Letters', 'SciPost Physics Letters'), ('SciPost Physics X', 'SciPost Physics X (cross-division)'), ('SciPost Physics', 'SciPost Physics (Experimental, Theoretical and Computational)'), ('SciPost Physics Lecture Notes', 'SciPost Physics Lecture Notes')])), + ('domain', models.CharField(max_length=1, choices=[('E', 'Experimental'), ('T', 'Theoretical'), ('C', 'Computational')], default='E')), ('specialization', models.CharField(max_length=1, choices=[('A', 'Atomic, Molecular and Optical Physics'), ('B', 'Biophysics'), ('C', 'Condensed Matter Physics'), ('F', 'Fluid Dynamics'), ('G', 'Gravitation, Cosmology and Astroparticle Physics'), ('H', 'High-Energy Physics'), ('M', 'Mathematical Physics'), ('N', 'Nuclear Physics'), ('Q', 'Quantum Statistical Mechanics'), ('S', 'Statistical and Soft Matter Physics')])), ('status', models.SmallIntegerField(choices=[(0, 'unassigned'), (1, 'editor in charge assigned'), (2, 'under review'), (3, 'reviewed, peer checking period'), (4, 'reviewed, peer checked, editorial decision pending'), (5, 'editorial decision')])), ('open_for_reporting', models.BooleanField(default=True)), @@ -28,12 +28,18 @@ class Migration(migrations.Migration): ('abstract', models.TextField()), ('arxiv_link', models.URLField(verbose_name='arXiv link (including version nr)')), ('submission_date', models.DateField(verbose_name='date of original publication')), - ('nr_ratings', models.IntegerField(default=0)), - ('clarity_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('correctness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), - ('usefulness_rating', models.DecimalField(default=0, max_digits=3, decimal_places=0)), + ('nr_clarity_ratings', models.IntegerField(default=0)), + ('clarity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_validity_ratings', models.IntegerField(default=0)), + ('validity_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_rigour_ratings', models.IntegerField(default=0)), + ('rigour_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_originality_ratings', models.IntegerField(default=0)), + ('originality_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), + ('nr_significance_ratings', models.IntegerField(default=0)), + ('significance_rating', models.DecimalField(max_digits=3, default=0, decimal_places=0)), ('latest_activity', models.DateTimeField(default=django.utils.timezone.now)), - ('editor_in_charge', models.ForeignKey(blank=True, related_name='editor_in_charge', to='contributors.Contributor', null=True)), + ('editor_in_charge', models.ForeignKey(null=True, to='contributors.Contributor', related_name='editor_in_charge', blank=True)), ('submitted_by', models.ForeignKey(to='contributors.Contributor')), ], ), diff --git a/submissions/migrations/0002_auto_20151206_1530.py b/submissions/migrations/0002_auto_20151206_1530.py deleted file mode 100644 index 3c9dd696773b19917dccaf5910583dfa17a4b217..0000000000000000000000000000000000000000 --- a/submissions/migrations/0002_auto_20151206_1530.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('submissions', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='submission', - name='submitted_to_journal', - field=models.CharField(max_length=30, choices=[('SciPost Physics Select', 'SciPost Physics Select'), ('SciPost Physics Letters', 'SciPost Physics Letters'), ('SciPost Physics X', 'SciPost Physics X (cross-division)'), ('SciPost Physics', 'SciPost Physics (Experimental, Theoretical and Computational)'), ('SciPost Physics Lecture Notes', 'SciPost Physics Lecture Notes')]), - ), - ] diff --git a/submissions/migrations/0002_auto_20151212_0919.py b/submissions/migrations/0002_auto_20151212_0919.py new file mode 100644 index 0000000000000000000000000000000000000000..685c061ac89dc83ecae4f99bbfd1910d3be2f532 --- /dev/null +++ b/submissions/migrations/0002_auto_20151212_0919.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('submissions', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='submission', + name='clarity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='submission', + name='originality_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='submission', + name='rigour_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='submission', + name='significance_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + migrations.AlterField( + model_name='submission', + name='validity_rating', + field=models.DecimalField(default=0, decimal_places=0, max_digits=3, null=True), + ), + ] diff --git a/submissions/models.py b/submissions/models.py index 2130ca02d136169009133a52c3d168ffbf87793f..e9da7b6563d838a2891755709387fc0c69528172 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -21,7 +21,7 @@ SUBMISSION_STATUS = ( class Submission(models.Model): submitted_by = models.ForeignKey(Contributor) vetted = models.BooleanField(default=False) - editor_in_charge = models.ForeignKey(Contributor, related_name="editor_in_charge", blank=True, null=True) # assigned by Journal Editor open_for_reporting = models.BooleanField(default=False) + editor_in_charge = models.ForeignKey(Contributor, related_name="editor_in_charge", blank=True, null=True) # assigned by Journal Editor submitted_to_journal = models.CharField(max_length=30, choices=SCIPOST_JOURNALS) domain = models.CharField(max_length=1, choices=SCIPOST_JOURNALS_DOMAINS, default='E') specialization = models.CharField(max_length=1, choices=SCIPOST_JOURNALS_SPECIALIZATIONS) @@ -33,10 +33,17 @@ class Submission(models.Model): abstract = models.TextField() arxiv_link = models.URLField(verbose_name='arXiv link (including version nr)') submission_date = models.DateField(verbose_name='date of original publication') - nr_ratings = models.IntegerField(default=0) - clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - correctness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) - usefulness_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0) + + nr_clarity_ratings = models.IntegerField(default=0) + clarity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_validity_ratings = models.IntegerField(default=0) + validity_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_rigour_ratings = models.IntegerField(default=0) + rigour_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_originality_ratings = models.IntegerField(default=0) + originality_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) + nr_significance_ratings = models.IntegerField(default=0) + significance_rating = models.DecimalField(default=0, max_digits=3, decimal_places=0, null=True) latest_activity = models.DateTimeField(default=timezone.now) def __str__ (self): diff --git a/submissions/templates/submissions/submission_detail.html b/submissions/templates/submissions/submission_detail.html index 3f3a87ae2a98e85b63b2969de1f293f9dfc95234..ec0d02d721d62ff798a702e23a24ddbdb2adf963 100644 --- a/submissions/templates/submissions/submission_detail.html +++ b/submissions/templates/submissions/submission_detail.html @@ -25,23 +25,14 @@ </div> <div class="col-8"> <ul class="ratingsdata"> - <li>Ratings: ({{ submission.nr_ratings }})</li> - <li>clarity: {{ submission.clarity_rating }}%</li> - <li>correctness: {{ submission.correctness_rating }}%</li> - <li>usefulness: {{ submission.usefulness_rating }}%</li> + <li>Ratings: </li> + <li>clarity: {{ submission.clarity_rating }}% ({{ submission.nr_clarity_ratings }})</li> + <li>validity: {{ submission.validity_rating }}% ({{ submission.nr_validity_ratings }})</li> + <li>rigour: {{ submission.rigour_rating }}% ({{ submission.nr_rigour_ratings }})</li> + <li>originality: {{ submission.originality_rating }}% ({{ submission.nr_originality_ratings }})</li> + <li>significance: {{ submission.significance_rating }}% ({{ submission.nr_significance_ratings }})</li> </ul> - {% if user.is_authenticated %} - <form action="{% url 'ratings:vote_on_submission' submission_id=submission.id %}" method="post" class="ratingsdata"> - {% csrf_token %} - <ul> - <li>Rate this publication:</li> - {{ submission_rating_form.as_ul }} - <li><input type="submit" value="Submit"></li> - </ul> - - </form> - {% endif %} </div> </div> @@ -58,6 +49,17 @@ <h3>Abstract:</h3> <p>{{ submission.abstract }}</p> + {% if user.is_authenticated %} + <form action="{% url 'ratings:vote_on_submission' submission_id=submission.id %}" method="post" class="ratingsdata"> + {% csrf_token %} + <ul> + <li>Rate this publication:</li> + {{ submission_rating_form.as_ul }} + <li><input type="submit" value="Submit"></li> + </ul> + + </form> + {% endif %} </section> {% if reports %} @@ -74,23 +76,13 @@ <div class="col-8"> <ul class="ratingsdata"> - <li>Ratings: ({{ report.nr_ratings }})</li> - <li>clarity: {{ report.clarity_rating }}%</li> - <li>correctness: {{ report.correctness_rating }}%</li> - <li>usefulness: {{ report.usefulness_rating }}%</li> + <li>Ratings: </li> + <li>clarity: {{ report.clarity_rating }}% ({{ report.nr_clarity_ratings }})</li> + <li>validity: {{ report.validity_rating }}% ({{ report.nr_validity_ratings }})</li> + <li>rigour: {{ report.rigour_rating }}% ({{ report.nr_rigour_ratings }})</li> + <li>originality: {{ report.originality_rating }}% ({{ report.nr_originality_ratings }})</li> + <li>significance: {{ report.significance_rating }}% ({{ report.nr_significance_ratings }})</li> </ul> - - {% if user.is_authenticated %} - <form action="{% url 'ratings:vote_on_report' report_id=report.id %}" method="post" class="ratingsdata"> - {% csrf_token %} - <ul> - <li>Rate this report:</li> - {{ report_rating_form.as_ul }} - <li><input type="submit" value="Submit"></li> - </ul> - - </form> - {% endif %} </div> </div> @@ -118,6 +110,17 @@ <p>{{ report.report }}</p> </div> </div> + {% if user.is_authenticated %} + <form action="{% url 'ratings:vote_on_report' report_id=report.id %}" method="post" class="ratingsdata"> + {% csrf_token %} + <ul> + <li>Rate this report:</li> + {{ report_rating_form.as_ul }} + <li><input type="submit" value="Submit"></li> + </ul> + </form> + {% endif %} + {% for reply in author_replies %} {% if reply.in_reply_to_report.id = report.id %} <div class="row"> @@ -170,23 +173,13 @@ <div class="col-8"> <ul class="ratingsdata"> - <li>Ratings: ({{ comment.nr_ratings }})</li> - <li>clarity: {{ comment.clarity_rating }}%</li> - <li>correctness: {{ comment.correctness_rating }}%</li> - <li>usefulness: {{ comment.usefulness_rating }}%</li> + <li>Ratings: </li> + <li>clarity: {{ comment.clarity_rating }}% ({{ comment.nr_clarity_ratings }})</li> + <li>validity: {{ comment.validity_rating }}% ({{ comment.nr_validity_ratings }})</li> + <li>rigour: {{ comment.rigour_rating }}% ({{ comment.nr_rigour_ratings }})</li> + <li>originality: {{ comment.originality_rating }}% ({{ comment.nr_originality_ratings }})</li> + <li>significance: {{ comment.significance_rating }}% ({{ comment.nr_significance_ratings }})</li> </ul> - - {% if user.is_authenticated %} - <form action="{% url 'ratings:vote_on_comment' comment_id=comment.id %}" method="post" class="ratingsdata"> - {% csrf_token %} - <ul> - <li>Rate this comment:</li> - {{ comment_rating_form.as_ul }} - <li><input type="submit" value="Submit"></li> - </ul> - - </form> - {% endif %} </div> </div> <div class="row"> @@ -196,6 +189,17 @@ </div> <div class="col-1"></div> </div> + {% if user.is_authenticated %} + <form action="{% url 'ratings:vote_on_comment' comment_id=comment.id %}" method="post" class="ratingsdata"> + {% csrf_token %} + <ul> + <li>Rate this comment:</li> + {{ comment_rating_form.as_ul }} + <li><input type="submit" value="Submit"></li> + </ul> + </form> + {% endif %} + {% for reply in author_replies %} {% if reply.in_reply_to_comment.id = comment.id %} <div class="row">