mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 16:03:19 +01:00
Merge branch 'conditional-tags'
This commit is contained in:
commit
e7ec916c79
@ -3,18 +3,21 @@ import datetime
|
|||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from helpdesk.settings import HAS_TAG_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
# Adding field 'Ticket.tags'
|
# Adding field 'Ticket.tags' if HAS_TAG_SUPPORT is True
|
||||||
|
if HAS_TAG_SUPPORT:
|
||||||
db.add_column('helpdesk_ticket', 'tags',
|
db.add_column('helpdesk_ticket', 'tags',
|
||||||
self.gf('tagging.fields.TagField')(default=''),
|
self.gf('tagging.fields.TagField')(default=''),
|
||||||
keep_default=False)
|
keep_default=False)
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
# Deleting field 'Ticket.tags'
|
# Deleting field 'Ticket.tags'
|
||||||
|
if HAS_TAG_SUPPORT:
|
||||||
db.delete_column('helpdesk_ticket', 'tags')
|
db.delete_column('helpdesk_ticket', 'tags')
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
@ -185,7 +188,6 @@ class Migration(SchemaMigration):
|
|||||||
'resolution': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
'resolution': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
'status': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
|
'status': ('django.db.models.fields.IntegerField', [], {'default': '1'}),
|
||||||
'submitter_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
|
'submitter_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
|
||||||
'tags': ('tagging.fields.TagField', [], {}),
|
|
||||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
||||||
},
|
},
|
||||||
'helpdesk.ticketcc': {
|
'helpdesk.ticketcc': {
|
||||||
@ -225,5 +227,8 @@ class Migration(SchemaMigration):
|
|||||||
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
|
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if HAS_TAG_SUPPORT:
|
||||||
|
models['helpdesk.ticket'].update({'tags': ('tagging.fields.TagField', [],
|
||||||
|
{}),})
|
||||||
|
|
||||||
complete_apps = ['helpdesk']
|
complete_apps = ['helpdesk']
|
Loading…
Reference in New Issue
Block a user