mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
Clean migrations for news system
This commit is contained in:
parent
b79c77f268
commit
df7b0a5ffe
@ -8,8 +8,8 @@ from django.conf import settings
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('club', '0005_auto_20161120_1149'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('com', '0001_initial'),
|
||||
]
|
||||
|
||||
@ -17,24 +17,24 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='News',
|
||||
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')),
|
||||
('summary', models.TextField(verbose_name='summary')),
|
||||
('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')),
|
||||
('club', models.ForeignKey(to='club.Club', verbose_name='club', related_name='news')),
|
||||
('moderator', models.ForeignKey(verbose_name='owner', to=settings.AUTH_USER_MODEL, related_name='moderated_news', null=True)),
|
||||
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL, verbose_name='owner', related_name='owned_news')),
|
||||
('author', models.ForeignKey(related_name='owned_news', to=settings.AUTH_USER_MODEL, verbose_name='author')),
|
||||
('club', models.ForeignKey(related_name='news', to='club.Club', verbose_name='club')),
|
||||
('moderator', models.ForeignKey(related_name='moderated_news', null=True, to=settings.AUTH_USER_MODEL, verbose_name='moderator')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='NewsDate',
|
||||
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')),
|
||||
('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')),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
@ -1,25 +0,0 @@
|
||||
# -*- 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', '0002_news_newsdate'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='news',
|
||||
old_name='owner',
|
||||
new_name='author',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='news',
|
||||
name='moderator',
|
||||
field=models.ForeignKey(null=True, to=settings.AUTH_USER_MODEL, related_name='moderated_news', verbose_name='moderator'),
|
||||
),
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# -*- 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'),
|
||||
),
|
||||
]
|
19
core/migrations/0018_auto_20161224_0211.py
Normal file
19
core/migrations/0018_auto_20161224_0211.py
Normal file
@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0017_auto_20161220_1626'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='notification',
|
||||
name='type',
|
||||
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'),
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue
Block a user