symposion_app/vendor/symposion/reviews/migrations/0001_initial.py
Sachi King d95d66dac8 Taking one out of PyCon's (US) book
We're lock-step with symposion, and upstream is dead.
Vendor it.
2017-05-27 20:11:39 +10:00

145 lines
9.7 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-17 03:35
import datetime
from decimal import Decimal
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('symposion_proposals', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Comment',
fields=[
('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)),
('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',
'verbose_name_plural': 'comments',
},
),
migrations.CreateModel(
name='LatestVote',
fields=[
('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',
'verbose_name_plural': 'latest votes',
},
),
migrations.CreateModel(
name='NotificationTemplate',
fields=[
('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',
'verbose_name_plural': 'notification templates',
},
),
migrations.CreateModel(
name='ProposalMessage',
fields=[
('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)),
('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'],
'verbose_name': 'proposal message',
'verbose_name_plural': 'proposal messages',
},
),
migrations.CreateModel(
name='ProposalResult',
fields=[
('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',
'verbose_name_plural': 'proposal_results',
},
),
migrations.CreateModel(
name='ResultNotification',
fields=[
('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')),
('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=[
('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)),
('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',
'verbose_name_plural': 'reviews',
},
),
migrations.CreateModel(
name='ReviewAssignment',
fields=[
('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')),
('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')]),
),
]