Permalink
Browse files

Make the label a null field.

  • Loading branch information...
1 parent 26e747f commit 76cb0cae85f55223c5507e4bb022a7ffebf7fdc7 @ionelmc committed Mar 23, 2012
Showing with 37 additions and 3 deletions.
  1. +34 −0 src/redisboard/migrations/0006_auto__chg_field_redisserver_label.py
  2. +3 −3 src/redisboard/models.py
@@ -0,0 +1,34 @@
+# 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 'RedisServer.label'
+ db.alter_column('redisboard_redisserver', 'label', self.gf('django.db.models.fields.CharField')(max_length=50, null=True))
+
+
+ def backwards(self, orm):
+
+ # Changing field 'RedisServer.label'
+ db.alter_column('redisboard_redisserver', 'label', self.gf('django.db.models.fields.CharField')(max_length=50))
+
+
+ models = {
+ 'redisboard.redisserver': {
+ 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'RedisServer'},
+ 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '250', 'null': 'True', 'blank': 'True'}),
+ 'port': ('django.db.models.fields.IntegerField', [], {'default': '6379', 'null': 'True', 'blank': 'True'}),
+ 'sampling_size': ('django.db.models.fields.IntegerField', [], {'default': '200'}),
+ 'sampling_threshold': ('django.db.models.fields.IntegerField', [], {'default': '1000'})
+ }
+ }
+
+ complete_apps = ['redisboard']
View
@@ -44,9 +44,9 @@ class Meta:
label = models.CharField(
_('Label'),
- max_length=50,
- default='',
- blank=True,
+ max_length = 50,
+ blank = True,
+ null = True,
)
hostname = models.CharField(

0 comments on commit 76cb0ca

Please sign in to comment.