Statistics
| Branch: | Tag: | Revision:

root / cloudcms / migrations / 0006_auto__add_clientversionsource__add_client.py @ 511913cb

History | View | Annotate | Download (7 kB)

1
# encoding: utf-8
2
import datetime
3
from south.db import db
4
from south.v2 import SchemaMigration
5
from django.db import models
6

    
7
class Migration(SchemaMigration):
8
    
9
    def forwards(self, orm):
10
        
11
        # Adding model 'ClientVersionSource'
12
        db.create_table('cloudcms_clientversionsource', (
13
            ('source_type', self.gf('django.db.models.fields.CharField')(max_length=60)),
14
            ('link', self.gf('django.db.models.fields.CharField')(max_length=255)),
15
            ('architecture', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)),
16
            ('logo', self.gf('feincms.module.medialibrary.fields.MediaFileForeignKey')(to=orm['medialibrary.MediaFile'], null=True, blank=True)),
17
            ('os', self.gf('django.db.models.fields.CharField')(max_length=255)),
18
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
19
        ))
20
        db.send_create_signal('cloudcms', ['ClientVersionSource'])
21

    
22
        # Adding model 'Client'
23
        db.create_table('cloudcms_client', (
24
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
25
            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
26
            ('uid', self.gf('django.db.models.fields.CharField')(max_length=255)),
27
        ))
28
        db.send_create_signal('cloudcms', ['Client'])
29

    
30
        # Adding M2M table for field sources on 'Client'
31
        db.create_table('cloudcms_client_sources', (
32
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
33
            ('client', models.ForeignKey(orm['cloudcms.client'], null=False)),
34
            ('clientversionsource', models.ForeignKey(orm['cloudcms.clientversionsource'], null=False))
35
        ))
36
        db.create_unique('cloudcms_client_sources', ['client_id', 'clientversionsource_id'])
37
    
38
    
39
    def backwards(self, orm):
40
        
41
        # Deleting model 'ClientVersionSource'
42
        db.delete_table('cloudcms_clientversionsource')
43

    
44
        # Deleting model 'Client'
45
        db.delete_table('cloudcms_client')
46

    
47
        # Removing M2M table for field sources on 'Client'
48
        db.delete_table('cloudcms_client_sources')
49
    
50
    
51
    models = {
52
        'cloudcms.application': {
53
            'Meta': {'object_name': 'Application'},
54
            'app_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
55
            'code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
56
            'extra_styles': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
57
            'facebook_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
58
            'favicon': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'as_favicon'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
59
            'footer_bottom': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
60
            'footer_top': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
61
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62
            'index_url': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255'}),
63
            'linked_in_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
64
            'logo': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
65
            'show_twitter_feed_on_top': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
66
            'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
67
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
68
            'twitter_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
69
        },
70
        'cloudcms.client': {
71
            'Meta': {'object_name': 'Client'},
72
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
73
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
74
            'sources': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cloudcms.ClientVersionSource']", 'symmetrical': 'False'}),
75
            'uid': ('django.db.models.fields.CharField', [], {'max_length': '255'})
76
        },
77
        'cloudcms.clientversionsource': {
78
            'Meta': {'object_name': 'ClientVersionSource'},
79
            'architecture': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
80
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
81
            'link': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
82
            'logo': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
83
            'os': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
84
            'source_type': ('django.db.models.fields.CharField', [], {'max_length': '60'})
85
        },
86
        'medialibrary.category': {
87
            'Meta': {'object_name': 'Category'},
88
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
89
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}),
90
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150', 'db_index': 'True'}),
91
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
92
        },
93
        'medialibrary.mediafile': {
94
            'Meta': {'object_name': 'MediaFile'},
95
            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}),
96
            'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
97
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
98
            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
99
            'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
100
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
101
            'type': ('django.db.models.fields.CharField', [], {'max_length': '12'})
102
        },
103
        'sites.site': {
104
            'Meta': {'object_name': 'Site', 'db_table': "'django_site'"},
105
            'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
106
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
107
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
108
        }
109
    }
110
    
111
    complete_apps = ['cloudcms']