Skip to content

Commit

Permalink
use IntegerField for bigger integer valuess
Browse files Browse the repository at this point in the history
  • Loading branch information
ukanga committed Oct 1, 2012
1 parent 5615fc0 commit accfdff
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions stats/migrations/0002_auto__chg_field_statscount_value.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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):

# Changing field 'StatsCount.value'
db.alter_column('stats_statscount', 'value', self.gf('django.db.models.fields.IntegerField')())


def backwards(self, orm):

# Changing field 'StatsCount.value'
db.alter_column('stats_statscount', 'value', self.gf('django.db.models.fields.SmallIntegerField')())


models = {
'stats.statscount': {
'Meta': {'object_name': 'StatsCount'},
'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'key': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'value': ('django.db.models.fields.IntegerField', [], {'default': '0'})
}
}

complete_apps = ['stats']
2 changes: 1 addition & 1 deletion stats/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class meta:
app_label = 'stats'

key = models.CharField(max_length=150)
value = models.SmallIntegerField(default=0)
value = models.IntegerField(default=0)
created_on = models.DateTimeField(auto_now_add=True)
modified_on = models.DateTimeField(auto_now=True)
objects = models.Manager()
Expand Down

0 comments on commit accfdff

Please sign in to comment.