From 6f0b8cab62e8d880a4c897198f4377032c925529 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 19 Oct 2010 15:27:14 +0200 Subject: [PATCH] tickets: Remove postal address fields from Booking. --- ...ng_address1__del_field_booking_address2.py | 40 +++++++++++++++++++ tickets/models.py | 2 - 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 tickets/migrations/0003_auto__del_field_booking_address1__del_field_booking_address2.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 index 0000000..ee5b524 --- /dev/null +++ b/tickets/migrations/0003_auto__del_field_booking_address1__del_field_booking_address2.py @@ -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'] diff --git a/tickets/models.py b/tickets/models.py index 3229020..ab80b5f 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -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") -- 2.30.2