symposion_app/vendor/symposion/reviews/migrations/0001_initial.py

146 lines
9.7 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2016-09-17 05:53:47 +00:00
# Generated by Django 1.9.7 on 2016-09-17 03:35
import datetime
2016-09-17 05:53:47 +00:00
from decimal import Decimal
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
2016-09-17 05:53:47 +00:00
initial = True
dependencies = [
2016-09-17 05:53:47 +00:00
('symposion_proposals', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Comment',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField(verbose_name='Text')),
('text_html', models.TextField(blank=True)),
2016-09-17 05:53:47 +00:00
('public', models.BooleanField(choices=[(True, 'public'), (False, 'private')], default=False, verbose_name='Public')),
('commented_at', models.DateTimeField(default=datetime.datetime.now, verbose_name='Commented at')),
('commenter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Commenter')),
('proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='symposion_proposals.ProposalBase', verbose_name='Proposal')),
],
options={
'verbose_name': 'comment',
2016-09-17 05:53:47 +00:00
'verbose_name_plural': 'comments',
},
),
migrations.CreateModel(
name='LatestVote',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('vote', models.CharField(choices=[('+2', '+2 \u2014 Good proposal and I will argue for it to be accepted.'), ('+1', '+1 \u2014 OK proposal, but I will not argue for it to be accepted.'), ('-1', '\u22121 \u2014 Weak proposal, but I will not argue strongly against acceptance.'), ('-2', '\u22122 \u2014 Serious issues and I will argue to reject this proposal.'), ('0', 'Abstain - I do not want to review this proposal and I do not want to see it again.')], max_length=2, verbose_name='Vote')),
('submitted_at', models.DateTimeField(default=datetime.datetime.now, editable=False, verbose_name='Submitted at')),
('proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='symposion_proposals.ProposalBase', verbose_name='Proposal')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
],
options={
'verbose_name': 'latest vote',
2016-09-17 05:53:47 +00:00
'verbose_name_plural': 'latest votes',
},
),
migrations.CreateModel(
name='NotificationTemplate',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('label', models.CharField(max_length=100, verbose_name='Label')),
('from_address', models.EmailField(max_length=254, verbose_name='From address')),
('subject', models.CharField(max_length=100, verbose_name='Subject')),
('body', models.TextField(verbose_name='Body')),
],
options={
'verbose_name': 'notification template',
2016-09-17 05:53:47 +00:00
'verbose_name_plural': 'notification templates',
},
),
migrations.CreateModel(
name='ProposalMessage',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('message', models.TextField(verbose_name='Message')),
('message_html', models.TextField(blank=True)),
2016-09-17 05:53:47 +00:00
('submitted_at', models.DateTimeField(default=datetime.datetime.now, editable=False, verbose_name='Submitted at')),
('proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='messages', to='symposion_proposals.ProposalBase', verbose_name='Proposal')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
],
options={
'ordering': ['submitted_at'],
2016-09-17 05:53:47 +00:00
'verbose_name': 'proposal message',
'verbose_name_plural': 'proposal messages',
},
),
migrations.CreateModel(
name='ProposalResult',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('score', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=5, verbose_name='Score')),
('comment_count', models.PositiveIntegerField(default=0, verbose_name='Comment count')),
('vote_count', models.PositiveIntegerField(default=0, verbose_name='Vote count')),
('abstain', models.PositiveIntegerField(default=0, verbose_name='Abstain')),
('plus_two', models.PositiveIntegerField(default=0, verbose_name='Plus two')),
('plus_one', models.PositiveIntegerField(default=0, verbose_name='Plus one')),
('minus_one', models.PositiveIntegerField(default=0, verbose_name='Minus one')),
('minus_two', models.PositiveIntegerField(default=0, verbose_name='Minus two')),
('accepted', models.NullBooleanField(choices=[(True, 'accepted'), (False, 'rejected'), (None, 'undecided')], default=None, verbose_name='Accepted')),
('status', models.CharField(choices=[('accepted', 'accepted'), ('rejected', 'rejected'), ('undecided', 'undecided'), ('standby', 'standby')], default='undecided', max_length=20, verbose_name='Status')),
('proposal', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='result', to='symposion_proposals.ProposalBase', verbose_name='Proposal')),
],
options={
'verbose_name': 'proposal_result',
2016-09-17 05:53:47 +00:00
'verbose_name_plural': 'proposal_results',
},
),
migrations.CreateModel(
name='ResultNotification',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('timestamp', models.DateTimeField(default=datetime.datetime.now, verbose_name='Timestamp')),
('to_address', models.EmailField(max_length=254, verbose_name='To address')),
('from_address', models.EmailField(max_length=254, verbose_name='From address')),
('subject', models.CharField(max_length=255, verbose_name='Subject')),
('body', models.TextField(verbose_name='Body')),
2016-09-17 05:53:47 +00:00
('proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications', to='symposion_proposals.ProposalBase', verbose_name='Proposal')),
('template', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='symposion_reviews.NotificationTemplate', verbose_name='Template')),
],
),
migrations.CreateModel(
name='Review',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('vote', models.CharField(blank=True, choices=[('+2', '+2 \u2014 Good proposal and I will argue for it to be accepted.'), ('+1', '+1 \u2014 OK proposal, but I will not argue for it to be accepted.'), ('-1', '\u22121 \u2014 Weak proposal, but I will not argue strongly against acceptance.'), ('-2', '\u22122 \u2014 Serious issues and I will argue to reject this proposal.'), ('0', 'Abstain - I do not want to review this proposal and I do not want to see it again.')], max_length=2, verbose_name='Vote')),
('comment', models.TextField(blank=True, verbose_name='Comment')),
('comment_html', models.TextField(blank=True)),
2016-09-17 05:53:47 +00:00
('submitted_at', models.DateTimeField(default=datetime.datetime.now, editable=False, verbose_name='Submitted at')),
('proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='symposion_proposals.ProposalBase', verbose_name='Proposal')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
],
options={
'verbose_name': 'review',
2016-09-17 05:53:47 +00:00
'verbose_name_plural': 'reviews',
},
),
migrations.CreateModel(
name='ReviewAssignment',
fields=[
2016-09-17 05:53:47 +00:00
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('origin', models.IntegerField(choices=[(0, 'auto-assigned, initial'), (1, 'opted-in'), (2, 'auto-assigned, later')], verbose_name='Origin')),
2016-09-17 05:53:47 +00:00
('assigned_at', models.DateTimeField(default=datetime.datetime.now, verbose_name='Assigned at')),
('opted_out', models.BooleanField(default=False, verbose_name='Opted out')),
('proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='symposion_proposals.ProposalBase', verbose_name='Proposal')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
],
),
migrations.AlterUniqueTogether(
name='latestvote',
unique_together=set([('proposal', 'user')]),
),
]