54 lines
3 KiB
Python
54 lines
3 KiB
Python
# -*- coding: utf-8 -*-
|
|
# pymode:lint_ignore=E501
|
|
from south.db import db
|
|
from south.v2 import SchemaMigration
|
|
|
|
|
|
class Migration(SchemaMigration):
|
|
|
|
def forwards(self, orm):
|
|
# Deleting field 'Mailbox.domain'
|
|
db.delete_column(u'managemails_mailbox', 'domain_id')
|
|
|
|
def backwards(self, orm):
|
|
# User chose to not deal with backwards NULL issues for 'Mailbox.domain'
|
|
raise RuntimeError("Cannot reverse this migration. 'Mailbox.domain' and its values cannot be restored.")
|
|
|
|
models = {
|
|
u'managemails.mailaddress': {
|
|
'Meta': {'unique_together': "(('localpart', 'domain'),)", 'object_name': 'MailAddress'},
|
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
|
'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailDomain']"}),
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
'localpart': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
|
},
|
|
u'managemails.mailaddressforward': {
|
|
'Meta': {'unique_together': "(('mailaddress', 'target'),)", 'object_name': 'MailAddressForward'},
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}),
|
|
'target': ('django.db.models.fields.EmailField', [], {'max_length': '254'})
|
|
},
|
|
u'managemails.mailaddressmailbox': {
|
|
'Meta': {'unique_together': "(('mailaddress', 'mailbox'),)", 'object_name': 'MailAddressMailbox'},
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
'mailaddress': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.MailAddress']"}),
|
|
'mailbox': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['managemails.Mailbox']"})
|
|
},
|
|
u'managemails.mailbox': {
|
|
'Meta': {'object_name': 'Mailbox'},
|
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
|
'gid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
|
|
'home': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
|
'password': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
|
|
'uid': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
|
|
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'})
|
|
},
|
|
u'managemails.maildomain': {
|
|
'Meta': {'object_name': 'MailDomain'},
|
|
'domain': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
|
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
|
}
|
|
}
|
|
|
|
complete_apps = ['managemails']
|