source: main/branches/3D/openPLM/plmapp/migrations/0005_auto.py @ 662

Revision 662, 16.5 KB checked in by pcosquer, 8 years ago (diff)

3D branch: merge changes from trunk (rev [661])

Line 
1# encoding: utf-8
2import datetime
3from south.db import db
4from south.v2 import SchemaMigration
5from django.db import models
6
7class Migration(SchemaMigration):
8
9    def forwards(self, orm):
10       
11        # Adding index on 'PLMObject', fields ['reference']
12        db.create_index('plmapp_plmobject', ['reference'])
13
14        # Adding index on 'PLMObjectUserLink', fields ['role']
15        db.create_index('plmapp_plmobjectuserlink', ['role'])
16
17        # Adding index on 'DelegationLink', fields ['role']
18        db.create_index('plmapp_delegationlink', ['role'])
19
20
21    def backwards(self, orm):
22       
23        # Removing index on 'DelegationLink', fields ['role']
24        db.delete_index('plmapp_delegationlink', ['role'])
25
26        # Removing index on 'PLMObjectUserLink', fields ['role']
27        db.delete_index('plmapp_plmobjectuserlink', ['role'])
28
29        # Removing index on 'PLMObject', fields ['reference']
30        db.delete_index('plmapp_plmobject', ['reference'])
31
32
33    models = {
34        'auth.group': {
35            'Meta': {'object_name': 'Group'},
36            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
38            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
39        },
40        'auth.permission': {
41            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
42            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
43            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
44            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
45            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
46        },
47        'auth.user': {
48            'Meta': {'object_name': 'User'},
49            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
50            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
51            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
52            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
53            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
55            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
56            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
57            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
58            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
59            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
60            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
61            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
62        },
63        'contenttypes.contenttype': {
64            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
65            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
66            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
67            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
68            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
69        },
70        'plmapp.delegationlink': {
71            'Meta': {'unique_together': "(('delegator', 'delegatee', 'role'),)", 'object_name': 'DelegationLink'},
72            'ctime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
73            'delegatee': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'delegationlink_delegatee'", 'to': "orm['auth.User']"}),
74            'delegator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'delegationlink_delegator'", 'to': "orm['auth.User']"}),
75            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
76            'role': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'})
77        },
78        'plmapp.document': {
79            'Meta': {'ordering': "['type', 'reference', 'revision']", 'object_name': 'Document', '_ormbases': ['plmapp.PLMObject']},
80            'plmobject_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['plmapp.PLMObject']", 'unique': 'True', 'primary_key': 'True'})
81        },
82        'plmapp.documentfile': {
83            'Meta': {'object_name': 'DocumentFile'},
84            'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['plmapp.Document']"}),
85            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
86            'filename': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
87            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88            'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
89            'locker': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
90            'size': ('django.db.models.fields.PositiveIntegerField', [], {}),
91            'thumbnail': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'})
92        },
93        'plmapp.documentpartlink': {
94            'Meta': {'unique_together': "(('document', 'part'),)", 'object_name': 'DocumentPartLink'},
95            'ctime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
96            'document': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documentpartlink_document'", 'to': "orm['plmapp.Document']"}),
97            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
98            'part': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'documentpartlink_part'", 'to': "orm['plmapp.Part']"})
99        },
100        'plmapp.grouphistory': {
101            'Meta': {'object_name': 'GroupHistory'},
102            'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
103            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
104            'details': ('django.db.models.fields.TextField', [], {}),
105            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
106            'plmobject': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']"}),
107            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'grouphistory_user'", 'to': "orm['auth.User']"})
108        },
109        'plmapp.groupinfo': {
110            'Meta': {'object_name': 'GroupInfo', '_ormbases': ['auth.Group']},
111            'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'groupinfo_creator'", 'to': "orm['auth.User']"}),
112            'ctime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 1, 6, 15, 26, 52, 852923)'}),
113            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
114            'group_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.Group']", 'unique': 'True', 'primary_key': 'True'}),
115            'mtime': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
116            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'groupinfo_owner'", 'to': "orm['auth.User']"})
117        },
118        'plmapp.history': {
119            'Meta': {'object_name': 'History'},
120            'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
121            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
122            'details': ('django.db.models.fields.TextField', [], {}),
123            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124            'plmobject': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['plmapp.PLMObject']"}),
125            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'history_user'", 'to': "orm['auth.User']"})
126        },
127        'plmapp.invitation': {
128            'Meta': {'object_name': 'Invitation'},
129            'ctime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 1, 6, 15, 26, 52, 856142)'}),
130            'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['plmapp.GroupInfo']"}),
131            'guest': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitation_inv_guest'", 'to': "orm['auth.User']"}),
132            'guest_asked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
133            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitation_inv_owner'", 'to': "orm['auth.User']"}),
134            'state': ('django.db.models.fields.CharField', [], {'default': "'p'", 'max_length': '1'}),
135            'token': ('django.db.models.fields.CharField', [], {'default': "'8696772256933239912406845880121995163669400296844007281790358315690088493453445789587455385106297863670173955736565452264388356878281071529838911021995850'", 'max_length': '155', 'primary_key': 'True'}),
136            'validation_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True'})
137        },
138        'plmapp.lifecycle': {
139            'Meta': {'object_name': 'Lifecycle'},
140            'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'primary_key': 'True'}),
141            'official_state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['plmapp.State']"})
142        },
143        'plmapp.lifecyclestates': {
144            'Meta': {'unique_together': "(('lifecycle', 'state'),)", 'object_name': 'LifecycleStates'},
145            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
146            'lifecycle': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['plmapp.Lifecycle']"}),
147            'rank': ('django.db.models.fields.PositiveSmallIntegerField', [], {}),
148            'state': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['plmapp.State']"})
149        },
150        'plmapp.parentchildlink': {
151            'Meta': {'unique_together': "(('parent', 'child', 'end_time'),)", 'object_name': 'ParentChildLink'},
152            'child': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parentchildlink_child'", 'to': "orm['plmapp.Part']"}),
153            'ctime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
154            'end_time': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
155            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
156            'order': ('django.db.models.fields.PositiveSmallIntegerField', [], {'default': '1'}),
157            'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'parentchildlink_parent'", 'to': "orm['plmapp.Part']"}),
158            'quantity': ('django.db.models.fields.FloatField', [], {'default': '1'})
159        },
160        'plmapp.part': {
161            'Meta': {'ordering': "['type', 'reference', 'revision']", 'object_name': 'Part', '_ormbases': ['plmapp.PLMObject']},
162            'plmobject_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['plmapp.PLMObject']", 'unique': 'True', 'primary_key': 'True'})
163        },
164        'plmapp.plmobject': {
165            'Meta': {'ordering': "['type', 'reference', 'revision']", 'unique_together': "(('reference', 'type', 'revision'),)", 'object_name': 'PLMObject'},
166            'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plmobject_creator'", 'to': "orm['auth.User']"}),
167            'ctime': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 1, 6, 15, 26, 52, 840630)'}),
168            'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plmobject_group'", 'to': "orm['plmapp.GroupInfo']"}),
169            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
170            'lifecycle': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plmobject_lifecyle'", 'to': "orm['plmapp.Lifecycle']"}),
171            'mtime': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
172            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
173            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plmobject_owner'", 'to': "orm['auth.User']"}),
174            'reference': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
175            'revision': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
176            'state': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plmobject_lifecyle'", 'to': "orm['plmapp.State']"}),
177            'type': ('django.db.models.fields.CharField', [], {'max_length': '50'})
178        },
179        'plmapp.plmobjectuserlink': {
180            'Meta': {'ordering': "['user', 'role', 'plmobject__type', 'plmobject__reference', 'plmobject__revision']", 'unique_together': "(('plmobject', 'user', 'role'),)", 'object_name': 'PLMObjectUserLink'},
181            'ctime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
182            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
183            'plmobject': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plmobjectuserlink_plmobject'", 'to': "orm['plmapp.PLMObject']"}),
184            'role': ('django.db.models.fields.CharField', [], {'max_length': '30', 'db_index': 'True'}),
185            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'plmobjectuserlink_user'", 'to': "orm['auth.User']"})
186        },
187        'plmapp.revisionlink': {
188            'Meta': {'unique_together': "(('old', 'new'),)", 'object_name': 'RevisionLink'},
189            'ctime': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
190            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
191            'new': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisionlink_new'", 'to': "orm['plmapp.PLMObject']"}),
192            'old': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisionlink_old'", 'to': "orm['plmapp.PLMObject']"})
193        },
194        'plmapp.state': {
195            'Meta': {'object_name': 'State'},
196            'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'primary_key': 'True'})
197        },
198        'plmapp.userhistory': {
199            'Meta': {'object_name': 'UserHistory'},
200            'action': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
201            'date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
202            'details': ('django.db.models.fields.TextField', [], {}),
203            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
204            'plmobject': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
205            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'userhistory_user'", 'to': "orm['auth.User']"})
206        },
207        'plmapp.userprofile': {
208            'Meta': {'object_name': 'UserProfile'},
209            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
210            'is_administrator': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
211            'is_contributor': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
212            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'})
213        }
214    }
215
216    complete_apps = ['plmapp']
Note: See TracBrowser for help on using the repository browser.