##// END OF EJS Templates
Added initial django 1.7 migration
neko259 -
r873:bcc74d45 2.2.2 default
parent child Browse files
Show More
@@ -0,0 +1,114 b''
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3
4 from django.db import models, migrations
5 import markupfield.fields
6 import boards.models.image
7 import boards.models.base
8 import boards.thumbs
9
10
11 class Migration(migrations.Migration):
12
13 dependencies = [
14 ]
15
16 operations = [
17 migrations.CreateModel(
18 name='Ban',
19 fields=[
20 ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
21 ('ip', models.GenericIPAddressField()),
22 ('reason', models.CharField(max_length=200, default='Auto')),
23 ('can_read', models.BooleanField(default=True)),
24 ],
25 options={
26 },
27 bases=(models.Model,),
28 ),
29 migrations.CreateModel(
30 name='Post',
31 fields=[
32 ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
33 ('title', models.CharField(max_length=200)),
34 ('pub_time', models.DateTimeField()),
35 ('text', markupfield.fields.MarkupField()),
36 ('text_markup_type', models.CharField(choices=[('', '--'), ('bbcode', 'bbcode')], max_length=30, default='bbcode')),
37 ('poster_ip', models.GenericIPAddressField()),
38 ('_text_rendered', models.TextField(editable=False)),
39 ('poster_user_agent', models.TextField()),
40 ('last_edit_time', models.DateTimeField()),
41 ('refmap', models.TextField(null=True, blank=True)),
42 ],
43 options={
44 'ordering': ('id',),
45 },
46 bases=(models.Model, boards.models.base.Viewable),
47 ),
48 migrations.CreateModel(
49 name='PostImage',
50 fields=[
51 ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
52 ('width', models.IntegerField(default=0)),
53 ('height', models.IntegerField(default=0)),
54 ('pre_width', models.IntegerField(default=0)),
55 ('pre_height', models.IntegerField(default=0)),
56 ('image', boards.thumbs.ImageWithThumbsField(height_field='height', width_field='width', upload_to=boards.models.image.PostImage._update_image_filename, blank=True)),
57 ('hash', models.CharField(max_length=36)),
58 ],
59 options={
60 'ordering': ('id',),
61 },
62 bases=(models.Model,),
63 ),
64 migrations.CreateModel(
65 name='Tag',
66 fields=[
67 ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
68 ('name', models.CharField(db_index=True, max_length=100)),
69 ],
70 options={
71 'ordering': ('name',),
72 },
73 bases=(models.Model, boards.models.base.Viewable),
74 ),
75 migrations.CreateModel(
76 name='Thread',
77 fields=[
78 ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')),
79 ('bump_time', models.DateTimeField()),
80 ('last_edit_time', models.DateTimeField()),
81 ('archived', models.BooleanField(default=False)),
82 ('bumpable', models.BooleanField(default=True)),
83 ('replies', models.ManyToManyField(null=True, related_name='tre+', to='boards.Post', blank=True)),
84 ('tags', models.ManyToManyField(to='boards.Tag')),
85 ],
86 options={
87 },
88 bases=(models.Model,),
89 ),
90 migrations.AddField(
91 model_name='tag',
92 name='threads',
93 field=models.ManyToManyField(null=True, related_name='tag+', to='boards.Thread', blank=True),
94 preserve_default=True,
95 ),
96 migrations.AddField(
97 model_name='post',
98 name='images',
99 field=models.ManyToManyField(null=True, db_index=True, related_name='ip+', to='boards.PostImage', blank=True),
100 preserve_default=True,
101 ),
102 migrations.AddField(
103 model_name='post',
104 name='referenced_posts',
105 field=models.ManyToManyField(null=True, db_index=True, related_name='rfp+', to='boards.Post', blank=True),
106 preserve_default=True,
107 ),
108 migrations.AddField(
109 model_name='post',
110 name='thread_new',
111 field=models.ForeignKey(null=True, default=None, to='boards.Thread'),
112 preserve_default=True,
113 ),
114 ]
General Comments 0
You need to be logged in to leave comments. Login now