From b6fe36f1cebb48d3d60f0ba07d83506ae3314a90 Mon Sep 17 00:00:00 2001 From: Andrew Mirsky Date: Fri, 11 Dec 2015 12:17:58 -0500 Subject: [PATCH 1/2] django 1.9 support: SortedDict deprecated. south migrations removed in favor of django migrations --- authorizenet/cim.py | 3 +- authorizenet/migrations/0001_initial.py | 217 ++++++++--------- .../migrations/0002_auto__add_cimresponse.py | 83 ------- .../0003_missing_response_fields.py | 84 ------- ...d__add_field_cimresponse_created__chg_f.py | 92 -------- ...e__add_customerprofile__chg_field_cimre.py | 220 ------------------ 6 files changed, 113 insertions(+), 586 deletions(-) delete mode 100644 authorizenet/migrations/0002_auto__add_cimresponse.py delete mode 100644 authorizenet/migrations/0003_missing_response_fields.py delete mode 100644 authorizenet/migrations/0004_auto__add_field_response_created__add_field_cimresponse_created__chg_f.py delete mode 100644 authorizenet/migrations/0005_auto__add_customerpaymentprofile__add_customerprofile__chg_field_cimre.py diff --git a/authorizenet/cim.py b/authorizenet/cim.py index 07ecae6..1fd2feb 100644 --- a/authorizenet/cim.py +++ b/authorizenet/cim.py @@ -1,7 +1,8 @@ import re import xml.dom.minidom -from django.utils.datastructures import SortedDict +#from django.utils.datastructures import SortedDict +from collections import OrderedDict as SortedDict from authorizenet.conf import settings import requests diff --git a/authorizenet/migrations/0001_initial.py b/authorizenet/migrations/0001_initial.py index 422cbba..d66b5e4 100644 --- a/authorizenet/migrations/0001_initial.py +++ b/authorizenet/migrations/0001_initial.py @@ -1,112 +1,117 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2015-12-11 17:14 +from __future__ import unicode_literals +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion -class Migration(SchemaMigration): - def forwards(self, orm): +class Migration(migrations.Migration): - # Adding model 'Response' - db.create_table('authorizenet_response', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('response_code', self.gf('django.db.models.fields.CharField')(max_length=2)), - ('response_subcode', self.gf('django.db.models.fields.CharField')(max_length=10)), - ('response_reason_code', self.gf('django.db.models.fields.CharField')(max_length=15)), - ('response_reason_text', self.gf('django.db.models.fields.TextField')()), - ('auth_code', self.gf('django.db.models.fields.CharField')(max_length=10)), - ('avs_code', self.gf('django.db.models.fields.CharField')(max_length=10)), - ('trans_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), - ('invoice_num', self.gf('django.db.models.fields.CharField')(max_length=20, blank=True)), - ('description', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('amount', self.gf('django.db.models.fields.CharField')(max_length=16)), - ('method', self.gf('django.db.models.fields.CharField')(max_length=10)), - ('type', self.gf('django.db.models.fields.CharField')(max_length=20, db_index=True)), - ('cust_id', self.gf('django.db.models.fields.CharField')(max_length=20)), - ('first_name', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('last_name', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('company', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('address', self.gf('django.db.models.fields.CharField')(max_length=60)), - ('city', self.gf('django.db.models.fields.CharField')(max_length=40)), - ('state', self.gf('django.db.models.fields.CharField')(max_length=40)), - ('zip', self.gf('django.db.models.fields.CharField')(max_length=20)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=60)), - ('phone', self.gf('django.db.models.fields.CharField')(max_length=25)), - ('fax', self.gf('django.db.models.fields.CharField')(max_length=25)), - ('email', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('ship_to_first_name', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('ship_to_last_name', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('ship_to_company', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('ship_to_address', self.gf('django.db.models.fields.CharField')(max_length=60, blank=True)), - ('ship_to_city', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('ship_to_state', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('ship_to_zip', self.gf('django.db.models.fields.CharField')(max_length=20, blank=True)), - ('ship_to_country', self.gf('django.db.models.fields.CharField')(max_length=60, blank=True)), - ('tax', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)), - ('duty', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)), - ('freight', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)), - ('tax_exempt', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)), - ('po_num', self.gf('django.db.models.fields.CharField')(max_length=25, blank=True)), - ('MD5_Hash', self.gf('django.db.models.fields.CharField')(max_length=255)), - ('cvv2_resp_code', self.gf('django.db.models.fields.CharField')(max_length=2, blank=True)), - ('cavv_response', self.gf('django.db.models.fields.CharField')(max_length=2, blank=True)), - ('test_request', self.gf('django.db.models.fields.CharField')(default='FALSE', max_length=10, blank=True)), - )) - db.send_create_signal('authorizenet', ['Response']) + initial = True - def backwards(self, orm): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] - # Deleting model 'Response' - db.delete_table('authorizenet_response') - - models = { - 'authorizenet.response': { - 'MD5_Hash': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'Meta': {'object_name': 'Response'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'amount': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'auth_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'avs_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'cavv_response': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'company': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'cust_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'cvv2_resp_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'duty': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'freight': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice_num': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'method': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'po_num': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}), - 'response_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'response_reason_code': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'response_reason_text': ('django.db.models.fields.TextField', [], {}), - 'response_subcode': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'ship_to_address': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_city': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_company': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_country': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_state': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_zip': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'tax': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'tax_exempt': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'test_request': ('django.db.models.fields.CharField', [], {'default': "'FALSE'", 'max_length': '10', 'blank': 'True'}), - 'trans_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '20'}) - } - } - - complete_apps = ['authorizenet'] + operations = [ + migrations.CreateModel( + name='CIMResponse', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('result', models.CharField(max_length=8)), + ('result_code', models.CharField(choices=[(b'I00001', b'Successful'), (b'I00003', b'The record has already been deleted.'), (b'E00001', b'An error occurred during processing. Please try again.'), (b'E00002', b'The content-type specified is not supported.'), (b'E00003', b'An error occurred while parsing the XML request.'), (b'E00004', b'The name of the requested API method is invalid.'), (b'E00005', b'The merchantAuthentication.transactionKey is invalid or not present.'), (b'E00006', b'The merchantAuthentication.name is invalid or not present.'), (b'E00007', b'User authentication failed due to invalid authentication values.'), (b'E00008', b'User authentication failed. The payment gateway account or user is inactive.'), (b'E00009', b'The payment gateway account is in Test Mode. The request cannot be processed.'), (b'E00010', b'User authentication failed. You do not have the appropriate permissions.'), (b'E00011', b'Access denied. You do not have the appropriate permissions.'), (b'E00013', b'The field is invalid.'), (b'E00014', b'A required field is not present.'), (b'E00015', b'The field length is invalid.'), (b'E00016', b'The field type is invalid.'), (b'E00019', b'The customer taxId or driversLicense information is required.'), (b'E00027', b'The transaction was unsuccessful.'), (b'E00029', b'Payment information is required.'), (b'E00039', b'A duplicate record already exists.'), (b'E00040', b'The record cannot be found.'), (b'E00041', b'One or more fields must contain a value.'), (b'E00042', b'The maximum number of payment profiles for the customer profile has been reached.'), (b'E00043', b'The maximum number of shipping addresses for the customer profile has been reached.'), (b'E00044', b'Customer Information Manager is not enabled.'), (b'E00045', b'The root node does not reference a valid XML namespace.'), (b'E00051', b'The original transaction was not issued for this payment profile.')], max_length=8)), + ('result_text', models.TextField()), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ], + ), + migrations.CreateModel( + name='CustomerPaymentProfile', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('payment_profile_id', models.CharField(max_length=50)), + ('first_name', models.CharField(blank=True, max_length=50)), + ('last_name', models.CharField(blank=True, max_length=50)), + ('company', models.CharField(blank=True, max_length=50)), + ('phone_number', models.CharField(blank=True, max_length=25)), + ('fax_number', models.CharField(blank=True, max_length=25)), + ('address', models.CharField(blank=True, max_length=60)), + ('city', models.CharField(blank=True, max_length=40)), + ('state', models.CharField(blank=True, max_length=40)), + ('zip', models.CharField(blank=True, max_length=20, verbose_name=b'ZIP')), + ('country', models.CharField(blank=True, max_length=60)), + ('card_number', models.CharField(blank=True, max_length=16)), + ('expiration_date', models.DateField(blank=True, null=True)), + ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_profiles', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='CustomerProfile', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('profile_id', models.CharField(max_length=50)), + ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='customer_profile', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Response', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('response_code', models.CharField(choices=[(b'1', b'Approved'), (b'2', b'Declined'), (b'3', b'Error'), (b'4', b'Held for Review')], max_length=2)), + ('response_subcode', models.CharField(max_length=10)), + ('response_reason_code', models.CharField(max_length=15)), + ('response_reason_text', models.TextField()), + ('auth_code', models.CharField(max_length=10)), + ('avs_code', models.CharField(choices=[(b'A', b'Address (Street) matches, ZIP does not'), (b'B', b'Address information not provided for AVS check'), (b'E', b'AVS error'), (b'G', b'Non-U.S. Card Issuing Bank'), (b'N', b'No Match on Address (Street) or ZIP'), (b'P', b'AVS not applicable for this transaction'), (b'R', b'Retry - System unavailable or timed out'), (b'S', b'Service not supported by issuer'), (b'U', b'Address information is unavailable'), (b'W', b'Nine digit ZIP matches, Address (Street) does not'), (b'X', b'Address (Street) and nine digit ZIP match'), (b'Y', b'Address (Street) and five digit ZIP match'), (b'Z', b'Five digit ZIP matches, Address (Street) does not')], max_length=10)), + ('trans_id', models.CharField(db_index=True, max_length=255)), + ('invoice_num', models.CharField(blank=True, max_length=20)), + ('description', models.CharField(max_length=255)), + ('amount', models.CharField(max_length=16)), + ('method', models.CharField(choices=[(b'CC', b'Credit Card'), (b'ECHECK', b'eCheck')], max_length=10)), + ('type', models.CharField(choices=[(b'auth_capture', b'Authorize and Capture'), (b'auth_only', b'Authorize only'), (b'credit', b'Credit'), (b'prior_auth_capture', b'Prior capture'), (b'void', b'Void')], db_index=True, max_length=20)), + ('cust_id', models.CharField(max_length=20)), + ('first_name', models.CharField(max_length=50)), + ('last_name', models.CharField(max_length=50)), + ('company', models.CharField(max_length=50)), + ('address', models.CharField(max_length=60)), + ('city', models.CharField(max_length=40)), + ('state', models.CharField(max_length=40)), + ('zip', models.CharField(max_length=20)), + ('country', models.CharField(max_length=60)), + ('phone', models.CharField(max_length=25)), + ('fax', models.CharField(max_length=25)), + ('email', models.CharField(max_length=255)), + ('ship_to_first_name', models.CharField(blank=True, max_length=50)), + ('ship_to_last_name', models.CharField(blank=True, max_length=50)), + ('ship_to_company', models.CharField(blank=True, max_length=50)), + ('ship_to_address', models.CharField(blank=True, max_length=60)), + ('ship_to_city', models.CharField(blank=True, max_length=40)), + ('ship_to_state', models.CharField(blank=True, max_length=40)), + ('ship_to_zip', models.CharField(blank=True, max_length=20)), + ('ship_to_country', models.CharField(blank=True, max_length=60)), + ('tax', models.CharField(blank=True, max_length=16)), + ('duty', models.CharField(blank=True, max_length=16)), + ('freight', models.CharField(blank=True, max_length=16)), + ('tax_exempt', models.CharField(blank=True, max_length=16)), + ('po_num', models.CharField(blank=True, max_length=25)), + ('MD5_Hash', models.CharField(max_length=255)), + ('cvv2_resp_code', models.CharField(blank=True, choices=[(b'M', b'Match'), (b'N', b'No Match'), (b'P', b'Not Processed'), (b'S', b'Should have been present'), (b'U', b'Issuer unable to process request')], max_length=2)), + ('cavv_response', models.CharField(blank=True, choices=[(b'', b'CAVV not validated'), (b'0', b'CAVV not validated because erroneous data was submitted'), (b'1', b'CAVV failed validation'), (b'2', b'CAVV passed validation'), (b'3', b'CAVV validation could not be performed; issuer attempt incomplete'), (b'4', b'CAVV validation could not be performed; issuer system error'), (b'5', b'Reserved for future use'), (b'6', b'Reserved for future use'), (b'7', b'CAVV attempt - failed validation - issuer available (U.S.-issued card/non-U.S acquirer)'), (b'8', b'CAVV attempt - passed validation - issuer available (U.S.-issued card/non-U.S. acquirer)'), (b'9', b'CAVV attempt - failed validation - issuer unavailable (U.S.-issued card/non-U.S. acquirer)'), (b'A', b'CAVV attempt - passed validation - issuer unavailable (U.S.-issued card/non-U.S. acquirer)'), (b'B', b'CAVV passed validation, information only, no liability shift')], max_length=2)), + ('test_request', models.CharField(blank=True, default=b'FALSE', max_length=10)), + ('card_type', models.CharField(blank=True, default=b'', max_length=10)), + ('account_number', models.CharField(blank=True, default=b'', max_length=10)), + ('created', models.DateTimeField(auto_now_add=True, null=True)), + ], + ), + migrations.AddField( + model_name='customerpaymentprofile', + name='customer_profile', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_profiles', to='authorizenet.CustomerProfile'), + ), + migrations.AddField( + model_name='cimresponse', + name='transaction_response', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='authorizenet.Response'), + ), + ] diff --git a/authorizenet/migrations/0002_auto__add_cimresponse.py b/authorizenet/migrations/0002_auto__add_cimresponse.py deleted file mode 100644 index 92188c9..0000000 --- a/authorizenet/migrations/0002_auto__add_cimresponse.py +++ /dev/null @@ -1,83 +0,0 @@ -# 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): - - # Adding model 'CIMResponse' - db.create_table('authorizenet_cimresponse', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('result', self.gf('django.db.models.fields.CharField')(max_length=8)), - ('result_code', self.gf('django.db.models.fields.CharField')(max_length=8)), - ('result_text', self.gf('django.db.models.fields.CharField')(max_length=1023)), - ('transaction_response', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['authorizenet.Response'], null=True, blank=True)), - )) - db.send_create_signal('authorizenet', ['CIMResponse']) - - def backwards(self, orm): - - # Deleting model 'CIMResponse' - db.delete_table('authorizenet_cimresponse') - - models = { - 'authorizenet.cimresponse': { - 'Meta': {'object_name': 'CIMResponse'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'result': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_code': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_text': ('django.db.models.fields.CharField', [], {'max_length': '1023'}), - 'transaction_response': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['authorizenet.Response']", 'null': 'True', 'blank': 'True'}) - }, - 'authorizenet.response': { - 'MD5_Hash': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'Meta': {'object_name': 'Response'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'amount': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'auth_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'avs_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'cavv_response': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'company': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'cust_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'cvv2_resp_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'duty': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'freight': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice_num': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'method': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'po_num': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}), - 'response_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'response_reason_code': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'response_reason_text': ('django.db.models.fields.TextField', [], {}), - 'response_subcode': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'ship_to_address': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_city': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_company': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_country': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_state': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_zip': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'tax': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'tax_exempt': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'test_request': ('django.db.models.fields.CharField', [], {'default': "'FALSE'", 'max_length': '10', 'blank': 'True'}), - 'trans_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '20'}) - } - } - - complete_apps = ['authorizenet'] diff --git a/authorizenet/migrations/0003_missing_response_fields.py b/authorizenet/migrations/0003_missing_response_fields.py deleted file mode 100644 index 9d8bb7b..0000000 --- a/authorizenet/migrations/0003_missing_response_fields.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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): - - # Adding field 'Response.card_type' - db.add_column('authorizenet_response', 'card_type', self.gf('django.db.models.fields.CharField')(default='', max_length=10, blank=True), keep_default=False) - - # Adding field 'Response.account_number' - db.add_column('authorizenet_response', 'account_number', self.gf('django.db.models.fields.CharField')(default='', max_length=10, blank=True), keep_default=False) - - def backwards(self, orm): - - # Deleting field 'Response.card_type' - db.delete_column('authorizenet_response', 'card_type') - - # Deleting field 'Response.account_number' - db.delete_column('authorizenet_response', 'account_number') - - models = { - 'authorizenet.cimresponse': { - 'Meta': {'object_name': 'CIMResponse'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'result': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_code': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_text': ('django.db.models.fields.CharField', [], {'max_length': '1023'}), - 'transaction_response': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['authorizenet.Response']", 'null': 'True', 'blank': 'True'}) - }, - 'authorizenet.response': { - 'MD5_Hash': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'Meta': {'object_name': 'Response'}, - 'account_number': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}), - 'address': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'amount': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'auth_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'avs_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'card_type': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}), - 'cavv_response': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'company': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'cust_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'cvv2_resp_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'duty': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'freight': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice_num': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'method': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'po_num': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}), - 'response_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'response_reason_code': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'response_reason_text': ('django.db.models.fields.TextField', [], {}), - 'response_subcode': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'ship_to_address': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_city': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_company': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_country': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_state': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_zip': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'tax': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'tax_exempt': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'test_request': ('django.db.models.fields.CharField', [], {'default': "'FALSE'", 'max_length': '10', 'blank': 'True'}), - 'trans_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '20'}) - } - } - - complete_apps = ['authorizenet'] diff --git a/authorizenet/migrations/0004_auto__add_field_response_created__add_field_cimresponse_created__chg_f.py b/authorizenet/migrations/0004_auto__add_field_response_created__add_field_cimresponse_created__chg_f.py deleted file mode 100644 index a88b006..0000000 --- a/authorizenet/migrations/0004_auto__add_field_response_created__add_field_cimresponse_created__chg_f.py +++ /dev/null @@ -1,92 +0,0 @@ -# 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): - - # Adding field 'Response.created' - db.add_column('authorizenet_response', 'created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True), keep_default=False) - - # Adding field 'CIMResponse.created' - db.add_column('authorizenet_cimresponse', 'created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, null=True, blank=True), keep_default=False) - - # Changing field 'CIMResponse.result_text' - db.alter_column('authorizenet_cimresponse', 'result_text', self.gf('django.db.models.fields.TextField')(max_length=1023)) - - def backwards(self, orm): - - # Deleting field 'Response.created' - db.delete_column('authorizenet_response', 'created') - - # Deleting field 'CIMResponse.created' - db.delete_column('authorizenet_cimresponse', 'created') - - # Changing field 'CIMResponse.result_text' - db.alter_column('authorizenet_cimresponse', 'result_text', self.gf('django.db.models.fields.CharField')(max_length=1023)) - - models = { - 'authorizenet.cimresponse': { - 'Meta': {'object_name': 'CIMResponse'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'result': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_code': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_text': ('django.db.models.fields.TextField', [], {'max_length': '1023'}), - 'transaction_response': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['authorizenet.Response']", 'null': 'True', 'blank': 'True'}) - }, - 'authorizenet.response': { - 'MD5_Hash': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'Meta': {'object_name': 'Response'}, - 'account_number': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}), - 'address': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'amount': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'auth_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'avs_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'card_type': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}), - 'cavv_response': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'company': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'cust_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'cvv2_resp_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'duty': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'freight': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice_num': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'method': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'po_num': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}), - 'response_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'response_reason_code': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'response_reason_text': ('django.db.models.fields.TextField', [], {}), - 'response_subcode': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'ship_to_address': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_city': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_company': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_country': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_state': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_zip': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'tax': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'tax_exempt': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'test_request': ('django.db.models.fields.CharField', [], {'default': "'FALSE'", 'max_length': '10', 'blank': 'True'}), - 'trans_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '20'}) - } - } - - complete_apps = ['authorizenet'] diff --git a/authorizenet/migrations/0005_auto__add_customerpaymentprofile__add_customerprofile__chg_field_cimre.py b/authorizenet/migrations/0005_auto__add_customerpaymentprofile__add_customerprofile__chg_field_cimre.py deleted file mode 100644 index 1bfae2d..0000000 --- a/authorizenet/migrations/0005_auto__add_customerpaymentprofile__add_customerprofile__chg_field_cimre.py +++ /dev/null @@ -1,220 +0,0 @@ -# -*- coding: 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): - # Adding model 'CustomerPaymentProfile' - db.create_table(u'authorizenet_customerpaymentprofile', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('customer', self.gf('django.db.models.fields.related.ForeignKey')(related_name='payment_profiles', to=orm['doctors.Practice'])), - ('customer_profile', self.gf('django.db.models.fields.related.ForeignKey')(related_name='payment_profiles', to=orm['authorizenet.CustomerProfile'])), - ('payment_profile_id', self.gf('django.db.models.fields.CharField')(max_length=50)), - ('first_name', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('last_name', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)), - ('company', self.gf('django.db.models.fields.CharField')(max_length=60, blank=True)), - ('phone_number', self.gf('django.db.models.fields.CharField')(max_length=25, blank=True)), - ('fax_number', self.gf('django.db.models.fields.CharField')(max_length=25, blank=True)), - ('address', self.gf('django.db.models.fields.CharField')(max_length=60, blank=True)), - ('city', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('state', self.gf('django.db.models.fields.CharField')(max_length=40, blank=True)), - ('zip', self.gf('django.db.models.fields.CharField')(max_length=20, blank=True)), - ('country', self.gf('django.db.models.fields.CharField')(max_length=60, blank=True)), - ('card_number', self.gf('django.db.models.fields.CharField')(max_length=16, blank=True)), - ('expiration_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), - )) - db.send_create_signal(u'authorizenet', ['CustomerPaymentProfile']) - - # Adding model 'CustomerProfile' - db.create_table(u'authorizenet_customerprofile', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('customer', self.gf('django.db.models.fields.related.OneToOneField')(related_name='customer_profile', unique=True, to=orm['doctors.Practice'])), - ('profile_id', self.gf('django.db.models.fields.CharField')(max_length=50)), - )) - db.send_create_signal(u'authorizenet', ['CustomerProfile']) - - - # Changing field 'CIMResponse.result_text' - db.alter_column(u'authorizenet_cimresponse', 'result_text', self.gf('django.db.models.fields.TextField')()) - - def backwards(self, orm): - # Deleting model 'CustomerPaymentProfile' - db.delete_table(u'authorizenet_customerpaymentprofile') - - # Deleting model 'CustomerProfile' - db.delete_table(u'authorizenet_customerprofile') - - - # Changing field 'CIMResponse.result_text' - db.alter_column(u'authorizenet_cimresponse', 'result_text', self.gf('django.db.models.fields.TextField')(max_length=1023)) - - models = { - u'authorizenet.cimresponse': { - 'Meta': {'object_name': 'CIMResponse'}, - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'result': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_code': ('django.db.models.fields.CharField', [], {'max_length': '8'}), - 'result_text': ('django.db.models.fields.TextField', [], {}), - 'transaction_response': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['authorizenet.Response']", 'null': 'True', 'blank': 'True'}) - }, - u'authorizenet.customerpaymentprofile': { - 'Meta': {'object_name': 'CustomerPaymentProfile'}, - 'address': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'card_number': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'company': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'customer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment_profiles'", 'to': u"orm['doctors.Practice']"}), - 'customer_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment_profiles'", 'to': u"orm['authorizenet.CustomerProfile']"}), - 'expiration_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), - 'fax_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'payment_profile_id': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'phone_number': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}) - }, - u'authorizenet.customerprofile': { - 'Meta': {'object_name': 'CustomerProfile'}, - 'customer': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'customer_profile'", 'unique': 'True', 'to': u"orm['doctors.Practice']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'profile_id': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - u'authorizenet.response': { - 'MD5_Hash': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'Meta': {'object_name': 'Response'}, - 'account_number': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}), - 'address': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'amount': ('django.db.models.fields.CharField', [], {'max_length': '16'}), - 'auth_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'avs_code': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'card_type': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '10', 'blank': 'True'}), - 'cavv_response': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'company': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'country': ('django.db.models.fields.CharField', [], {'max_length': '60'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'cust_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}), - 'cvv2_resp_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}), - 'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'duty': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'email': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'fax': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'freight': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'invoice_num': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'method': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'phone': ('django.db.models.fields.CharField', [], {'max_length': '25'}), - 'po_num': ('django.db.models.fields.CharField', [], {'max_length': '25', 'blank': 'True'}), - 'response_code': ('django.db.models.fields.CharField', [], {'max_length': '2'}), - 'response_reason_code': ('django.db.models.fields.CharField', [], {'max_length': '15'}), - 'response_reason_text': ('django.db.models.fields.TextField', [], {}), - 'response_subcode': ('django.db.models.fields.CharField', [], {'max_length': '10'}), - 'ship_to_address': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_city': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_company': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_country': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}), - 'ship_to_first_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_last_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'ship_to_state': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), - 'ship_to_zip': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}), - 'state': ('django.db.models.fields.CharField', [], {'max_length': '40'}), - 'tax': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'tax_exempt': ('django.db.models.fields.CharField', [], {'max_length': '16', 'blank': 'True'}), - 'test_request': ('django.db.models.fields.CharField', [], {'default': "'FALSE'", 'max_length': '10', 'blank': 'True'}), - 'trans_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), - 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '20'}) - }, - u'base.address': { - 'Meta': {'object_name': 'Address'}, - 'address1': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'address2': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'state': ('django_localflavor_us.models.USStateField', [], {'max_length': '2', 'blank': 'True'}), - 'zip': ('django.db.models.fields.CharField', [], {'max_length': '10', 'blank': 'True'}) - }, - u'doctors.employeetype': { - 'Meta': {'object_name': 'EmployeeType'}, - 'has_profile': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_doctor': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_schedulable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}) - }, - u'doctors.practice': { - 'Meta': {'object_name': 'Practice'}, - 'accepted_insurance': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['medical.InsurancePlan']", 'symmetrical': 'False', 'blank': 'True'}), - 'addresses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['base.Address']", 'through': u"orm['doctors.PracticeAddress']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'phone': ('base.fields.PhoneNumberField', [], {'max_length': '20'}), - 'practice_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['doctors.PracticeType']"}), - 'statement': ('django.db.models.fields.TextField', [], {'max_length': '5000', 'blank': 'True'}), - 'timezone': ('timezone_field.fields.TimeZoneField', [], {}) - }, - u'doctors.practiceaddress': { - 'Meta': {'object_name': 'PracticeAddress'}, - 'address': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['base.Address']", 'unique': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'practice': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['doctors.Practice']"}) - }, - u'doctors.practiceemployeetype': { - 'Meta': {'ordering': "['order']", 'object_name': 'PracticeEmployeeType', 'db_table': "'doctors_practicetype_employee_types'"}, - 'employeetype': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['doctors.EmployeeType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}), - 'practicetype': ('adminsortable.fields.SortableForeignKey', [], {'to': u"orm['doctors.PracticeType']"}) - }, - u'doctors.practicetype': { - 'Meta': {'ordering': "['order']", 'object_name': 'PracticeType'}, - 'employee_types': ('sortedm2m.fields.SortedManyToManyField', [], {'to': u"orm['doctors.EmployeeType']", 'through': u"orm['doctors.PracticeEmployeeType']", 'symmetrical': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}), - 'specialties': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['medical.DoctorSpecialty']", 'symmetrical': 'False'}) - }, - u'medical.appointmenttype': { - 'Meta': {'ordering': "['order']", 'object_name': 'AppointmentType'}, - 'category': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['medical.BillingCategory']", 'null': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}), - 'specialty': ('adminsortable.fields.SortableForeignKey', [], {'related_name': "'appointment_types'", 'to': u"orm['medical.DoctorSpecialty']"}) - }, - u'medical.billingcategory': { - 'Meta': {'object_name': 'BillingCategory'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - u'medical.doctorspecialty': { - 'Meta': {'ordering': "['order']", 'object_name': 'DoctorSpecialty'}, - 'default_appointment_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['medical.AppointmentType']", 'null': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}) - }, - u'medical.insuranceplan': { - 'Meta': {'ordering': "['provider__name', 'name']", 'object_name': 'InsurancePlan'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plans'", 'to': u"orm['medical.InsuranceProvider']"}) - }, - u'medical.insuranceprovider': { - 'Meta': {'ordering': "['name']", 'object_name': 'InsuranceProvider'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - } - } - - complete_apps = ['authorizenet'] \ No newline at end of file From 1bbc70b34b4c721e0938251a5855f386e23592e7 Mon Sep 17 00:00:00 2001 From: Andrew Mirsky Date: Tue, 26 Jan 2016 13:40:40 -0500 Subject: [PATCH 2/2] split CustomerPaymentProfile & CustomerProfile into separate migration, in case models haven't been migrated since pre-django 1.7 migrations (aka south) --- authorizenet/migrations/0001_initial.py | 38 ++----------- .../migrations/0002_django16_to_django19.py | 53 +++++++++++++++++++ 2 files changed, 57 insertions(+), 34 deletions(-) create mode 100644 authorizenet/migrations/0002_django16_to_django19.py diff --git a/authorizenet/migrations/0001_initial.py b/authorizenet/migrations/0001_initial.py index d66b5e4..265ac8d 100644 --- a/authorizenet/migrations/0001_initial.py +++ b/authorizenet/migrations/0001_initial.py @@ -26,34 +26,7 @@ class Migration(migrations.Migration): ('created', models.DateTimeField(auto_now_add=True, null=True)), ], ), - migrations.CreateModel( - name='CustomerPaymentProfile', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('payment_profile_id', models.CharField(max_length=50)), - ('first_name', models.CharField(blank=True, max_length=50)), - ('last_name', models.CharField(blank=True, max_length=50)), - ('company', models.CharField(blank=True, max_length=50)), - ('phone_number', models.CharField(blank=True, max_length=25)), - ('fax_number', models.CharField(blank=True, max_length=25)), - ('address', models.CharField(blank=True, max_length=60)), - ('city', models.CharField(blank=True, max_length=40)), - ('state', models.CharField(blank=True, max_length=40)), - ('zip', models.CharField(blank=True, max_length=20, verbose_name=b'ZIP')), - ('country', models.CharField(blank=True, max_length=60)), - ('card_number', models.CharField(blank=True, max_length=16)), - ('expiration_date', models.DateField(blank=True, null=True)), - ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_profiles', to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.CreateModel( - name='CustomerProfile', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('profile_id', models.CharField(max_length=50)), - ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='customer_profile', to=settings.AUTH_USER_MODEL)), - ], - ), + migrations.CreateModel( name='Response', fields=[ @@ -104,14 +77,11 @@ class Migration(migrations.Migration): ('created', models.DateTimeField(auto_now_add=True, null=True)), ], ), - migrations.AddField( - model_name='customerpaymentprofile', - name='customer_profile', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_profiles', to='authorizenet.CustomerProfile'), - ), + migrations.AddField( model_name='cimresponse', name='transaction_response', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='authorizenet.Response'), - ), + ) + ] diff --git a/authorizenet/migrations/0002_django16_to_django19.py b/authorizenet/migrations/0002_django16_to_django19.py new file mode 100644 index 0000000..60a2ce8 --- /dev/null +++ b/authorizenet/migrations/0002_django16_to_django19.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.1 on 2016-01-26 18:29 +from __future__ import unicode_literals + +from django.db import migrations, models +from django.conf import settings +import django.db.models.deletion + + + +class Migration(migrations.Migration): + + dependencies = [ + ('authorizenet', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='CustomerProfile', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('profile_id', models.CharField(max_length=50)), + ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='customer_profile', to=settings.AUTH_USER_MODEL)), + ] + ), + + migrations.CreateModel( + name='CustomerPaymentProfile', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('payment_profile_id', models.CharField(max_length=50)), + ('first_name', models.CharField(blank=True, max_length=50)), + ('last_name', models.CharField(blank=True, max_length=50)), + ('company', models.CharField(blank=True, max_length=50)), + ('phone_number', models.CharField(blank=True, max_length=25)), + ('fax_number', models.CharField(blank=True, max_length=25)), + ('address', models.CharField(blank=True, max_length=60)), + ('city', models.CharField(blank=True, max_length=40)), + ('state', models.CharField(blank=True, max_length=40)), + ('zip', models.CharField(blank=True, max_length=20, verbose_name=b'ZIP')), + ('country', models.CharField(blank=True, max_length=60)), + ('card_number', models.CharField(blank=True, max_length=16)), + ('expiration_date', models.DateField(blank=True, null=True)), + ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_profiles', to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.AddField( + model_name='customerpaymentprofile', + name='customer_profile', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payment_profiles', to='authorizenet.CustomerProfile'), + ) + + ]