PEP8 cleanup, unused imports, missing imports, style cleanups
This commit is contained in:
@@ -4,10 +4,10 @@ from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
|
||||
# Adding model 'DocumentVersionSignature'
|
||||
db.create_table('document_signatures_documentversionsignature', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
@@ -17,13 +17,10 @@ class Migration(SchemaMigration):
|
||||
))
|
||||
db.send_create_signal('document_signatures', ['DocumentVersionSignature'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
|
||||
# Deleting model 'DocumentVersionSignature'
|
||||
db.delete_table('document_signatures_documentversionsignature')
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
|
||||
@@ -4,12 +4,13 @@ from south.db import db
|
||||
from south.v2 import DataMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(DataMigration):
|
||||
|
||||
depends_on = (
|
||||
('documents', '0012_auto__add_field_documentversion_signature_file'),
|
||||
)
|
||||
|
||||
|
||||
def forwards(self, orm):
|
||||
for document_version in orm['documents.DocumentVersion'].objects.all():
|
||||
if document_version.signature_state or document_version.signature_file:
|
||||
@@ -20,15 +21,13 @@ class Migration(DataMigration):
|
||||
)
|
||||
document_signature.save()
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
for document_signature in orm.DocumentVersionSignature.objects.all():
|
||||
document_version = document_signature.document_version
|
||||
document_version.signature_state=document_signature.signature_state
|
||||
document_version.signature_file=document_signature.signature_file
|
||||
document_version.signature_state = document_signature.signature_state
|
||||
document_version.signature_file = document_signature.signature_file
|
||||
document_version.save()
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
# 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):
|
||||
|
||||
# Adding field 'DocumentVersionSignature.has_embedded_signature'
|
||||
db.add_column('document_signatures_documentversionsignature', 'has_embedded_signature', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
|
||||
# Deleting field 'DocumentVersionSignature.has_embedded_signature'
|
||||
db.delete_column('document_signatures_documentversionsignature', 'has_embedded_signature')
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# encoding: utf-8
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import DataMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(DataMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
@@ -12,7 +12,7 @@ class Migration(DataMigration):
|
||||
document_signature.has_embedded_signature = True
|
||||
else:
|
||||
document_signature.has_embedded_signature = False
|
||||
|
||||
|
||||
document_signature.save()
|
||||
|
||||
def backwards(self, orm):
|
||||
@@ -20,7 +20,6 @@ class Migration(DataMigration):
|
||||
# No way to revert
|
||||
raise RuntimeError("Cannot reverse this migration.")
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
# 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):
|
||||
|
||||
# Deleting field 'DocumentVersionSignature.signature_state'
|
||||
db.delete_column('document_signatures_documentversionsignature', 'signature_state')
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
|
||||
# Adding field 'DocumentVersionSignature.signature_state'
|
||||
db.add_column('document_signatures_documentversionsignature', 'signature_state', self.gf('django.db.models.fields.CharField')(max_length=16, null=True, blank=True), keep_default=False)
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
|
||||
Reference in New Issue
Block a user