1 # -*- coding: utf-8 -*-
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
8 class Migration(SchemaMigration):
10 def forwards(self, orm):
11 # Adding model 'Payment'
12 db.create_table(u'getpaid_payment', (
13 (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14 ('amount', self.gf('django.db.models.fields.DecimalField')(max_digits=20, decimal_places=4)),
15 ('currency', self.gf('django.db.models.fields.CharField')(max_length=3)),
16 ('status', self.gf('django.db.models.fields.CharField')(default='new', max_length=20, db_index=True)),
17 ('backend', self.gf('django.db.models.fields.CharField')(max_length=50)),
18 ('created_on', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
19 ('paid_on', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, db_index=True, blank=True)),
20 ('amount_paid', self.gf('django.db.models.fields.DecimalField')(default=0, max_digits=20, decimal_places=4)),
21 ('order', self.gf('django.db.models.fields.related.ForeignKey')(related_name='payment', to=orm['funding.Funding'])),
23 db.send_create_signal(u'getpaid', ['Payment'])
26 def backwards(self, orm):
27 # Deleting model 'Payment'
28 db.delete_table(u'getpaid_payment')
33 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
34 '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
35 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
36 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
37 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
38 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
39 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
40 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
41 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
42 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
43 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
44 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
45 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
47 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
48 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
49 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
50 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
51 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
52 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
53 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
54 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
55 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
56 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
59 'Meta': {'ordering': "['-payed_at']", 'object_name': 'Funding'},
60 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}),
61 'anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
62 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
63 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
64 'name': ('django.db.models.fields.CharField', [], {'max_length': '127', 'blank': 'True'}),
65 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['funding.Offer']"}),
66 'payed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
67 'perks': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['funding.Perk']", 'symmetrical': 'False', 'blank': 'True'})
70 'Meta': {'ordering': "['-end']", 'object_name': 'Offer'},
71 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
72 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']", 'null': 'True', 'blank': 'True'}),
73 'due': ('django.db.models.fields.DateField', [], {}),
74 'end': ('django.db.models.fields.DateField', [], {}),
75 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
76 'redakcja_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
77 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
78 'start': ('django.db.models.fields.DateField', [], {}),
79 'target': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}),
80 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
83 'Meta': {'ordering': "['-price']", 'object_name': 'Perk'},
84 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
85 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
86 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
87 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['funding.Offer']", 'null': 'True', 'blank': 'True'}),
88 'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'})
91 'Meta': {'ordering': "('-created_on',)", 'object_name': 'Payment'},
92 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '20', 'decimal_places': '4'}),
93 'amount_paid': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '20', 'decimal_places': '4'}),
94 'backend': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
95 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
96 'currency': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
97 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
98 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment'", 'to': u"orm['funding.Funding']"}),
99 'paid_on': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
100 'status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '20', 'db_index': 'True'})
104 complete_apps = ['getpaid']