Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing field description and expand Version length #5597

Merged
merged 1 commit into from
Sep 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kalite/packages/bundled/securesync/devices/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Device(SyncedModel):
name = models.CharField(max_length=100, blank=True)
description = models.TextField(blank=True)
public_key = models.CharField(max_length=500, db_index=True)
version = models.CharField(max_length=len("10.10.100"), default="0.9.2", blank=True); version.minversion="0.9.3" # default comes from knowing when this feature was implemented!
version = models.CharField(max_length=64, default="0.9.2", blank=True); version.minversion="0.9.3" # default comes from knowing when this feature was implemented!

objects = DeviceManager()
all_objects = DeviceManager(show_deleted=True)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# -*- 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):

# Changing field 'Device.version'
db.alter_column(u'securesync_device', 'version', self.gf('django.db.models.fields.CharField')(max_length=64))
# Adding field 'FacilityGroup.description'
db.add_column(u'securesync_facilitygroup', 'description',
self.gf('django.db.models.fields.TextField')(default='', blank=True),
keep_default=False)


def backwards(self, orm):

# Changing field 'Device.version'
db.alter_column(u'securesync_device', 'version', self.gf('django.db.models.fields.CharField')(max_length=9))
# Deleting field 'FacilityGroup.description'
db.delete_column(u'securesync_facilitygroup', 'description')


models = {
'securesync.cachedpassword': {
'Meta': {'object_name': 'CachedPassword'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.FacilityUser']", 'unique': 'True'})
},
'securesync.device': {
'Meta': {'object_name': 'Device'},
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'public_key': ('django.db.models.fields.CharField', [], {'max_length': '500', 'db_index': 'True'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'version': ('django.db.models.fields.CharField', [], {'default': "'0.9.2'", 'max_length': '64', 'blank': 'True'}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"})
},
'securesync.devicemetadata': {
'Meta': {'object_name': 'DeviceMetadata'},
'counter_position': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'device': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['securesync.Device']", 'unique': 'True', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_demo_device': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_own_device': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_trusted': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'securesync.devicezone': {
'Meta': {'object_name': 'DeviceZone'},
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'device': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.Device']", 'unique': 'True'}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'max_counter': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'revoked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'zone': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.Zone']"}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"})
},
'securesync.facility': {
'Meta': {'object_name': 'Facility'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '400', 'blank': 'True'}),
'address_normalized': ('django.db.models.fields.CharField', [], {'max_length': '400', 'blank': 'True'}),
'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '60', 'blank': 'True'}),
'contact_name': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}),
'contact_phone': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}),
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'latitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'longitude': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'user_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"}),
'zoom': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'})
},
'securesync.facilitygroup': {
'Meta': {'object_name': 'FacilityGroup'},
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'facility': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.Facility']"}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"})
},
'securesync.facilityuser': {
'Meta': {'object_name': 'FacilityUser'},
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'default_language': ('django.db.models.fields.CharField', [], {'max_length': '8', 'null': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'facility': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.Facility']"}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.FacilityGroup']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'is_teacher': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '60', 'blank': 'True'}),
'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'username': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"})
},
'securesync.importpurgatory': {
'Meta': {'object_name': 'ImportPurgatory'},
'counter': ('django.db.models.fields.IntegerField', [], {}),
'exceptions': ('django.db.models.fields.TextField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'retry_attempts': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'serialized_models': ('django.db.models.fields.TextField', [], {}),
'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
},
'securesync.registereddevicepublickey': {
'Meta': {'object_name': 'RegisteredDevicePublicKey'},
'created_timestamp': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'public_key': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
'used_timestamp': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
'zone': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.Zone']"})
},
'securesync.syncedlog': {
'Meta': {'object_name': 'SyncedLog'},
'category': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'value': ('django.db.models.fields.CharField', [], {'max_length': '250', 'blank': 'True'}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"})
},
'securesync.syncsession': {
'Meta': {'object_name': 'SyncSession'},
'client_device': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'client_sessions'", 'to': "orm['securesync.Device']"}),
'client_nonce': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'client_os': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
'client_version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'errors': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'ip': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'models_downloaded': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'models_uploaded': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'server_device': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'server_sessions'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'server_nonce': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'verified': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'securesync.zone': {
'Meta': {'object_name': 'Zone'},
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"})
},
'securesync.zoneinvitation': {
'Meta': {'object_name': 'ZoneInvitation'},
'counter': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.CharField', [], {'max_length': '32', 'primary_key': 'True'}),
'invited_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['securesync.Device']"}),
'private_key': ('django.db.models.fields.CharField', [], {'max_length': '2500', 'null': 'True', 'blank': 'True'}),
'public_key': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
'public_key_signature': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
'revoked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'signature': ('django.db.models.fields.CharField', [], {'max_length': '360', 'null': 'True', 'blank': 'True'}),
'signed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'signed_version': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
'used_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Device']"}),
'zone': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['securesync.Zone']"}),
'zone_fallback': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['securesync.Zone']"})
}
}

complete_apps = ['securesync']