Commit df7b0a5f authored by Skia's avatar Skia 🤘
Browse files

Clean migrations for news system

parent b79c77f2
Pipeline #621 passed with stage
in 2 minutes and 32 seconds
...@@ -8,8 +8,8 @@ from django.conf import settings ...@@ -8,8 +8,8 @@ from django.conf import settings
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('club', '0005_auto_20161120_1149'), ('club', '0005_auto_20161120_1149'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('com', '0001_initial'), ('com', '0001_initial'),
] ]
...@@ -17,24 +17,24 @@ class Migration(migrations.Migration): ...@@ -17,24 +17,24 @@ class Migration(migrations.Migration):
migrations.CreateModel( migrations.CreateModel(
name='News', name='News',
fields=[ fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
('title', models.CharField(max_length=64, verbose_name='title')), ('title', models.CharField(max_length=64, verbose_name='title')),
('summary', models.TextField(verbose_name='summary')), ('summary', models.TextField(verbose_name='summary')),
('content', models.TextField(verbose_name='content')), ('content', models.TextField(verbose_name='content')),
('type', models.CharField(max_length=16, choices=[('NOTICE', 'Notice'), ('EVENT', 'Event'), ('WEEKLY', 'Weekly'), ('CALL', 'Call')], default='EVENT', verbose_name='type')), ('type', models.CharField(choices=[('NOTICE', 'Notice'), ('EVENT', 'Event'), ('WEEKLY', 'Weekly'), ('CALL', 'Call')], default='EVENT', max_length=16, verbose_name='type')),
('is_moderated', models.BooleanField(default=False, verbose_name='is moderated')), ('is_moderated', models.BooleanField(default=False, verbose_name='is moderated')),
('club', models.ForeignKey(to='club.Club', verbose_name='club', related_name='news')), ('author', models.ForeignKey(related_name='owned_news', to=settings.AUTH_USER_MODEL, verbose_name='author')),
('moderator', models.ForeignKey(verbose_name='owner', to=settings.AUTH_USER_MODEL, related_name='moderated_news', null=True)), ('club', models.ForeignKey(related_name='news', to='club.Club', verbose_name='club')),
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='owner', related_name='owned_news')), ('moderator', models.ForeignKey(related_name='moderated_news', null=True, to=settings.AUTH_USER_MODEL, verbose_name='moderator')),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name='NewsDate', name='NewsDate',
fields=[ fields=[
('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
('start_date', models.DateTimeField(null=True, blank=True, verbose_name='start_date')), ('start_date', models.DateTimeField(null=True, blank=True, verbose_name='start_date')),
('end_date', models.DateTimeField(null=True, blank=True, verbose_name='end_date')), ('end_date', models.DateTimeField(null=True, blank=True, verbose_name='end_date')),
('news', models.ForeignKey(to='com.News', verbose_name='news_date', related_name='dates')), ('news', models.ForeignKey(related_name='dates', to='com.News', verbose_name='news_date')),
], ],
), ),
] ]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('com', '0003_auto_20161223_1548'),
]
operations = [
migrations.AlterField(
model_name='news',
name='author',
field=models.ForeignKey(to=settings.AUTH_USER_MODEL, related_name='owned_news', verbose_name='author'),
),
]
...@@ -2,24 +2,18 @@ ...@@ -2,24 +2,18 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from django.db import migrations, models from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('com', '0002_news_newsdate'), ('core', '0017_auto_20161220_1626'),
] ]
operations = [ operations = [
migrations.RenameField(
model_name='news',
old_name='owner',
new_name='author',
),
migrations.AlterField( migrations.AlterField(
model_name='news', model_name='notification',
name='moderator', name='type',
field=models.ForeignKey(null=True, to=settings.AUTH_USER_MODEL, related_name='moderated_news', verbose_name='moderator'), field=models.CharField(choices=[('NEWS_MODERATION', 'A fresh new to be moderated'), ('FILE_MODERATION', 'New files to be moderated'), ('SAS_MODERATION', 'New pictures/album to be moderated in the SAS'), ('NEW_PICTURES', "You've been identified on some pictures"), ('REFILLING', 'You just refilled of %s €'), ('SELLING', 'You just bought %s'), ('GENERIC', 'You have a notification')], default='GENERIC', max_length=32, verbose_name='type'),
), ),
] ]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment