tickets: Remove postal address fields from Booking.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 19 Oct 2010 13:27:14 +0000 (15:27 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 19 Oct 2010 13:27:14 +0000 (15:27 +0200)
tickets/migrations/0003_auto__del_field_booking_address1__del_field_booking_address2.py [new file with mode: 0644]
tickets/models.py

diff --git a/tickets/migrations/0003_auto__del_field_booking_address1__del_field_booking_address2.py b/tickets/migrations/0003_auto__del_field_booking_address1__del_field_booking_address2.py
new file mode 100644 (file)
index 0000000..ee5b524
--- /dev/null
@@ -0,0 +1,40 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+    
+    def forwards(self, orm):
+        
+        # Deleting field 'Booking.address1'
+        db.delete_column('tickets_booking', 'address1')
+
+        # Deleting field 'Booking.address2'
+        db.delete_column('tickets_booking', 'address2')
+    
+    
+    def backwards(self, orm):
+        
+        # Adding field 'Booking.address1'
+        db.add_column('tickets_booking', 'address1', self.gf('django.db.models.fields.CharField')(default='', max_length=50), keep_default=False)
+
+        # Adding field 'Booking.address2'
+        db.add_column('tickets_booking', 'address2', self.gf('django.db.models.fields.CharField')(default='', max_length=50), keep_default=False)
+    
+    
+    models = {
+        'tickets.booking': {
+            'Meta': {'object_name': 'Booking'},
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'payment': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+            'show': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+            'tickets': ('django.db.models.fields.IntegerField', [], {})
+        }
+    }
+    
+    complete_apps = ['tickets']
index 3229020872d4afd33f531b80fbaab2e7fe7cbca2..ab80b5f807a1fe9df0064be7c3b9adf90d603b5c 100644 (file)
@@ -16,8 +16,6 @@ TICKET_PRICE=10
 class Booking(models.Model):
     created = models.DateTimeField(auto_now_add=True, editable=False, verbose_name="Datum")
     name = models.CharField(max_length=100, verbose_name="Naam")
-    address1 = models.CharField(max_length=50, verbose_name="Adres")
-    address2 = models.CharField(max_length=50, verbose_name="")
     email = models.EmailField(verbose_name="Email adres")
     tickets = models.IntegerField(choices=TICKETS_CHOICES, verbose_name="Aantal kaarten")
     show = models.CharField(max_length=50, choices=SHOW_CHOICES, verbose_name="Voorstelling")