diff --git a/.gitignore b/.gitignore index ded6067..2dd763a 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ nosetests.xml .mr.developer.cfg .project .pydevproject + +# Editors +.idea \ No newline at end of file diff --git a/ripple_api/south_migrations/0001_initial.py b/ripple_api/south_migrations/0001_initial.py new file mode 100644 index 0000000..f602ffe --- /dev/null +++ b/ripple_api/south_migrations/0001_initial.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as 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 'Transaction' + db.create_table('ripple_api_transaction', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('account', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('destination', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('hash', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), + ('tx_blob', self.gf('django.db.models.fields.TextField')(blank=True)), + ('currency', self.gf('django.db.models.fields.CharField')(max_length=3)), + ('issuer', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('value', self.gf('django.db.models.fields.CharField')(max_length=100)), + ('source_tag', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('destination_tag', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('ledger_index', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)), + ('status', self.gf('django.db.models.fields.SmallIntegerField')(default=0)), + ('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='returning_transaction', null=True, to=orm['ripple_api.Transaction'])), + ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), + )) + db.send_create_signal('ripple_api', ['Transaction']) + + + def backwards(self, orm): + # Deleting model 'Transaction' + db.delete_table('ripple_api_transaction') + + + models = { + 'ripple_api.transaction': { + 'Meta': {'object_name': 'Transaction'}, + 'account': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'currency': ('django.db.models.fields.CharField', [], {'max_length': '3'}), + 'destination': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'destination_tag': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'hash': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'issuer': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'ledger_index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'returning_transaction'", 'null': 'True', 'to': "orm['ripple_api.Transaction']"}), + 'source_tag': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'tx_blob': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'value': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['ripple_api'] \ No newline at end of file diff --git a/ripple_api/south_migrations/0002_auto__del_unique_transaction_hash.py b/ripple_api/south_migrations/0002_auto__del_unique_transaction_hash.py new file mode 100644 index 0000000..3fc4629 --- /dev/null +++ b/ripple_api/south_migrations/0002_auto__del_unique_transaction_hash.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Removing unique constraint on 'Transaction', fields ['hash'] + db.delete_unique('ripple_api_transaction', ['hash']) + + + def backwards(self, orm): + # Adding unique constraint on 'Transaction', fields ['hash'] + db.create_unique('ripple_api_transaction', ['hash']) + + + models = { + 'ripple_api.transaction': { + 'Meta': {'object_name': 'Transaction'}, + 'account': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'currency': ('django.db.models.fields.CharField', [], {'max_length': '3'}), + 'destination': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'destination_tag': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'hash': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'issuer': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'ledger_index': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'returning_transaction'", 'null': 'True', 'to': "orm['ripple_api.Transaction']"}), + 'source_tag': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'tx_blob': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'value': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['ripple_api'] \ No newline at end of file diff --git a/ripple_api/south_migrations/__init__.py b/ripple_api/south_migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index 84c5c7c..93f4f11 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ version='0.0.48', packages=find_packages(), requires=['python (>= 2.7)', 'requests', 'django_model_utils'], - install_requires=['requests<2.3.0', 'django-model-utils'], + install_requires=['requests>=2.6.0', 'django-model-utils', 'South==1.0.2'], tests_require=['mock'], description='Python wrapper for the Ripple API', long_description=open(join(dirname(__file__), 'README.rst')).read(),