|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 from south.db import db |
|
4 from django.db import models |
|
5 from project.kiwipycon.proceedings.models import * |
|
6 |
|
7 class Migration: |
|
8 |
|
9 def forwards(self, orm): |
|
10 |
|
11 # Adding model 'Paper' |
|
12 db.create_table('proceedings_paper', ( |
|
13 ('body', models.TextField()), |
|
14 ('abstract', models.TextField()), |
|
15 ('id', models.AutoField(primary_key=True)), |
|
16 ('title', models.CharField(max_length=200)), |
|
17 )) |
|
18 db.send_create_signal('proceedings', ['Paper']) |
|
19 |
|
20 # Adding model 'Attachments' |
|
21 db.create_table('proceedings_attachments', ( |
|
22 ('paper', models.ForeignKey(orm.Paper)), |
|
23 ('id', models.AutoField(primary_key=True)), |
|
24 ('attachments', models.FileField(upload_to='attachments/%Y/%m/%d')), |
|
25 )) |
|
26 db.send_create_signal('proceedings', ['Attachments']) |
|
27 |
|
28 # Adding ManyToManyField 'Paper.authors' |
|
29 db.create_table('proceedings_paper_authors', ( |
|
30 ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), |
|
31 ('paper', models.ForeignKey(Paper, null=False)), |
|
32 ('user', models.ForeignKey(User, null=False)) |
|
33 )) |
|
34 |
|
35 |
|
36 |
|
37 def backwards(self, orm): |
|
38 |
|
39 # Deleting model 'Paper' |
|
40 db.delete_table('proceedings_paper') |
|
41 |
|
42 # Deleting model 'Attachments' |
|
43 db.delete_table('proceedings_attachments') |
|
44 |
|
45 # Dropping ManyToManyField 'Paper.authors' |
|
46 db.delete_table('proceedings_paper_authors') |
|
47 |
|
48 |
|
49 |
|
50 models = { |
|
51 'proceedings.paper': { |
|
52 'abstract': ('models.TextField', [], {}), |
|
53 'authors': ('models.ManyToManyField', ['User'], {}), |
|
54 'body': ('models.TextField', [], {}), |
|
55 'id': ('models.AutoField', [], {'primary_key': 'True'}), |
|
56 'title': ('models.CharField', [], {'max_length': '200'}) |
|
57 }, |
|
58 'auth.user': { |
|
59 '_stub': True, |
|
60 'id': ('models.AutoField', [], {'primary_key': 'True'}) |
|
61 }, |
|
62 'proceedings.attachments': { |
|
63 'attachments': ('models.FileField', [], {'upload_to': "'attachments/%Y/%m/%d'"}), |
|
64 'id': ('models.AutoField', [], {'primary_key': 'True'}), |
|
65 'paper': ('models.ForeignKey', ['Paper'], {}) |
|
66 } |
|
67 } |
|
68 |
|
69 complete_apps = ['proceedings'] |