mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Reset forum migrations
This commit is contained in:
parent
59dfcbd567
commit
aa07749a47
@ -2,14 +2,17 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import django.utils.timezone
|
from django.utils.timezone import utc
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
import django.utils.timezone
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('club', '0006_auto_20161229_0040'),
|
||||||
('core', '0019_preferences_receive_weekmail'),
|
('core', '0019_preferences_receive_weekmail'),
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -17,35 +20,45 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Forum',
|
name='Forum',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||||
('name', models.CharField(verbose_name='name', max_length=64)),
|
('name', models.CharField(max_length=64, verbose_name='name')),
|
||||||
('description', models.CharField(default='', verbose_name='description', max_length=256)),
|
('description', models.CharField(max_length=256, verbose_name='description', default='')),
|
||||||
('is_category', models.BooleanField(default=False, verbose_name='is a category')),
|
('is_category', models.BooleanField(verbose_name='is a category', default=False)),
|
||||||
('edit_groups', models.ManyToManyField(default=[4], related_name='editable_forums', blank=True, to='core.Group')),
|
('edit_groups', models.ManyToManyField(related_name='editable_forums', to='core.Group', blank=True, default=[4])),
|
||||||
('owner_group', models.ForeignKey(default=12, related_name='owned_forums', to='core.Group')),
|
('owner_club', models.ForeignKey(to='club.Club', verbose_name='owner club', related_name='owned_forums', default=1)),
|
||||||
('parent', models.ForeignKey(null=True, related_name='children', blank=True, to='forum.Forum')),
|
('parent', models.ForeignKey(to='forum.Forum', null=True, related_name='children', blank=True)),
|
||||||
('view_groups', models.ManyToManyField(default=[2], related_name='viewable_forums', blank=True, to='core.Group')),
|
('view_groups', models.ManyToManyField(related_name='viewable_forums', to='core.Group', blank=True, default=[2])),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='ForumMessage',
|
name='ForumMessage',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||||
('title', models.CharField(default='', verbose_name='title', blank=True, max_length=64)),
|
('title', models.CharField(max_length=64, blank=True, verbose_name='title', default='')),
|
||||||
('message', models.TextField(default='', verbose_name='message')),
|
('message', models.TextField(verbose_name='message', default='')),
|
||||||
('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date')),
|
('date', models.DateTimeField(verbose_name='date', default=django.utils.timezone.now)),
|
||||||
('author', models.ForeignKey(related_name='forum_messages', to=settings.AUTH_USER_MODEL)),
|
('author', models.ForeignKey(related_name='forum_messages', to=settings.AUTH_USER_MODEL)),
|
||||||
|
('readers', models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name='readers', related_name='read_messages')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'ordering': ['id'],
|
'ordering': ['id'],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ForumMessageMeta',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||||
|
('date', models.DateTimeField(verbose_name='date', default=django.utils.timezone.now)),
|
||||||
|
('action', models.CharField(max_length=16, choices=[('EDIT', 'Message edited by'), ('DELETE', 'Message deleted by'), ('UNDELETE', 'Message undeleted by')], verbose_name='action')),
|
||||||
|
('message', models.ForeignKey(related_name='metas', to='forum.ForumMessage')),
|
||||||
|
('user', models.ForeignKey(related_name='forum_message_metas', to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='ForumTopic',
|
name='ForumTopic',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||||
('title', models.CharField(default='', verbose_name='title', max_length=64)),
|
('description', models.CharField(max_length=256, verbose_name='description', default='')),
|
||||||
('description', models.CharField(default='', verbose_name='description', max_length=256)),
|
|
||||||
('author', models.ForeignKey(related_name='forum_topics', to=settings.AUTH_USER_MODEL)),
|
('author', models.ForeignKey(related_name='forum_topics', to=settings.AUTH_USER_MODEL)),
|
||||||
('forum', models.ForeignKey(related_name='topics', to='forum.Forum')),
|
('forum', models.ForeignKey(related_name='topics', to='forum.Forum')),
|
||||||
],
|
],
|
||||||
@ -53,6 +66,14 @@ class Migration(migrations.Migration):
|
|||||||
'ordering': ['-id'],
|
'ordering': ['-id'],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ForumUserInfo',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
|
||||||
|
('last_read_date', models.DateTimeField(verbose_name='last read date', default=datetime.datetime(1999, 1, 1, 0, 0, tzinfo=utc))),
|
||||||
|
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, related_name='_forum_infos')),
|
||||||
|
],
|
||||||
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='forummessage',
|
model_name='forummessage',
|
||||||
name='topic',
|
name='topic',
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('forum', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='forum',
|
|
||||||
name='owner_group',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='forumtopic',
|
|
||||||
name='title',
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,20 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('club', '0006_auto_20161229_0040'),
|
|
||||||
('forum', '0002_auto_20170128_1958'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='forum',
|
|
||||||
name='owner_club',
|
|
||||||
field=models.ForeignKey(related_name='owned_forums', verbose_name='owner club', to='club.Club', default=1),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,26 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
from django.conf import settings
|
|
||||||
from django.utils.timezone import utc
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
('forum', '0003_forum_owner_club'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='ForumUserInfo',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(serialize=False, verbose_name='ID', auto_created=True, primary_key=True)),
|
|
||||||
('last_read_date', models.DateTimeField(verbose_name='last read date', default=datetime.datetime(1999, 1, 1, 0, 0, tzinfo=utc))),
|
|
||||||
('user', models.OneToOneField(related_name='_forum_infos', to=settings.AUTH_USER_MODEL)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,19 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('forum', '0004_forumuserinfo'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='forumuserinfo',
|
|
||||||
name='read_messages',
|
|
||||||
field=models.ManyToManyField(to='forum.ForumMessage', related_name='readers', verbose_name='read messages'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -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 = [
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
('forum', '0005_forumuserinfo_read_messages'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='forumuserinfo',
|
|
||||||
name='read_messages',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='forummessage',
|
|
||||||
name='readers',
|
|
||||||
field=models.ManyToManyField(to=settings.AUTH_USER_MODEL, related_name='read_messages', verbose_name='readers'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -1,27 +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),
|
|
||||||
('forum', '0006_auto_20170128_2243'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='ForumMessageMeta',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(verbose_name='ID', serialize=False, primary_key=True, auto_created=True)),
|
|
||||||
('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date')),
|
|
||||||
('action', models.CharField(max_length=16, choices=[('EDIT', 'Edit'), ('DELETE', 'Delete'), ('UNDELETE', 'Undelete')], verbose_name='action')),
|
|
||||||
('message', models.ForeignKey(related_name='metas', to='forum.ForumMessage')),
|
|
||||||
('user', models.ForeignKey(related_name='forum_message_metas', to=settings.AUTH_USER_MODEL)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
]
|
|
Loading…
Reference in New Issue
Block a user