Commit aa07749a authored by Skia's avatar Skia

Reset forum migrations

parent 59dfcbd5
Pipeline #766 passed with stage
in 3 minutes and 15 seconds
......@@ -2,14 +2,17 @@
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
from django.utils.timezone import utc
from django.conf import settings
import django.utils.timezone
import datetime
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('club', '0006_auto_20161229_0040'),
('core', '0019_preferences_receive_weekmail'),
]
......@@ -17,35 +20,45 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Forum',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('name', models.CharField(verbose_name='name', max_length=64)),
('description', models.CharField(default='', verbose_name='description', max_length=256)),
('is_category', models.BooleanField(default=False, verbose_name='is a category')),
('edit_groups', models.ManyToManyField(default=[4], related_name='editable_forums', blank=True, to='core.Group')),
('owner_group', models.ForeignKey(default=12, related_name='owned_forums', to='core.Group')),
('parent', models.ForeignKey(null=True, related_name='children', blank=True, to='forum.Forum')),
('view_groups', models.ManyToManyField(default=[2], related_name='viewable_forums', blank=True, to='core.Group')),
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
('name', models.CharField(max_length=64, verbose_name='name')),
('description', models.CharField(max_length=256, verbose_name='description', default='')),
('is_category', models.BooleanField(verbose_name='is a category', default=False)),
('edit_groups', models.ManyToManyField(related_name='editable_forums', to='core.Group', blank=True, default=[4])),
('owner_club', models.ForeignKey(to='club.Club', verbose_name='owner club', related_name='owned_forums', default=1)),
('parent', models.ForeignKey(to='forum.Forum', null=True, related_name='children', blank=True)),
('view_groups', models.ManyToManyField(related_name='viewable_forums', to='core.Group', blank=True, default=[2])),
],
),
migrations.CreateModel(
name='ForumMessage',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('title', models.CharField(default='', verbose_name='title', blank=True, max_length=64)),
('message', models.TextField(default='', verbose_name='message')),
('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date')),
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
('title', models.CharField(max_length=64, blank=True, verbose_name='title', default='')),
('message', models.TextField(verbose_name='message', default='')),
('date', models.DateTimeField(verbose_name='date', default=django.utils.timezone.now)),
('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={
'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(
name='ForumTopic',
fields=[
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
('title', models.CharField(default='', verbose_name='title', max_length=64)),
('description', models.CharField(default='', verbose_name='description', max_length=256)),
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
('description', models.CharField(max_length=256, verbose_name='description', default='')),
('author', models.ForeignKey(related_name='forum_topics', to=settings.AUTH_USER_MODEL)),
('forum', models.ForeignKey(related_name='topics', to='forum.Forum')),
],
......@@ -53,6 +66,14 @@ class Migration(migrations.Migration):
'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(
model_name='forummessage',
name='topic',
......
# -*- 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',
),
]
# -*- 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),
),
]
# -*- 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)),
],
),
]
# -*- 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'),
),
]
# -*- 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'),
),
]
# -*- 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)),
],
),
]
Markdown is supported
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