Skip to content

Commit

Permalink
add south migrations, bump the min required requests pkg version to 2…
Browse files Browse the repository at this point in the history
….6.0
  • Loading branch information
Yan committed Nov 28, 2018
1 parent 9c475db commit dcb671a
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject

# Editors
.idea
56 changes: 56 additions & 0 deletions ripple_api/south_migration/0001_initial.py
Original file line number Diff line number Diff line change
@@ -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']
Original file line number Diff line number Diff line change
@@ -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']
Empty file.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
tests_require=['mock'],
description='Python wrapper for the Ripple API',
long_description=open(join(dirname(__file__), 'README.rst')).read(),
Expand Down

0 comments on commit dcb671a

Please sign in to comment.