Skip to content

Commit c220935

Browse files
committed
Initial migrations. See ietf-tools#535
- Legacy-Id: 2640
1 parent 41790b9 commit c220935

6 files changed

Lines changed: 527 additions & 0 deletions

File tree

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
2+
from south.db import db
3+
from django.db import models
4+
from ietf.ietfworkflows.models import *
5+
6+
class Migration:
7+
8+
def forwards(self, orm):
9+
10+
# Adding model 'WGWorkflow'
11+
db.create_table('ietfworkflows_wgworkflow', (
12+
('workflow_ptr', orm['ietfworkflows.WGWorkflow:workflow_ptr']),
13+
))
14+
db.send_create_signal('ietfworkflows', ['WGWorkflow'])
15+
16+
# Adding model 'ObjectWorkflowHistoryEntry'
17+
db.create_table('ietfworkflows_objectworkflowhistoryentry', (
18+
('id', orm['ietfworkflows.ObjectWorkflowHistoryEntry:id']),
19+
('content_type', orm['ietfworkflows.ObjectWorkflowHistoryEntry:content_type']),
20+
('content_id', orm['ietfworkflows.ObjectWorkflowHistoryEntry:content_id']),
21+
('from_state', orm['ietfworkflows.ObjectWorkflowHistoryEntry:from_state']),
22+
('to_state', orm['ietfworkflows.ObjectWorkflowHistoryEntry:to_state']),
23+
('transition_date', orm['ietfworkflows.ObjectWorkflowHistoryEntry:transition_date']),
24+
('comment', orm['ietfworkflows.ObjectWorkflowHistoryEntry:comment']),
25+
))
26+
db.send_create_signal('ietfworkflows', ['ObjectWorkflowHistoryEntry'])
27+
28+
# Adding model 'ObjectAnnotationTagHistoryEntry'
29+
db.create_table('ietfworkflows_objectannotationtaghistoryentry', (
30+
('id', orm['ietfworkflows.ObjectAnnotationTagHistoryEntry:id']),
31+
('content_type', orm['ietfworkflows.ObjectAnnotationTagHistoryEntry:content_type']),
32+
('content_id', orm['ietfworkflows.ObjectAnnotationTagHistoryEntry:content_id']),
33+
('setted', orm['ietfworkflows.ObjectAnnotationTagHistoryEntry:setted']),
34+
('unsetted', orm['ietfworkflows.ObjectAnnotationTagHistoryEntry:unsetted']),
35+
('change_date', orm['ietfworkflows.ObjectAnnotationTagHistoryEntry:change_date']),
36+
('comment', orm['ietfworkflows.ObjectAnnotationTagHistoryEntry:comment']),
37+
))
38+
db.send_create_signal('ietfworkflows', ['ObjectAnnotationTagHistoryEntry'])
39+
40+
# Adding model 'AnnotationTag'
41+
db.create_table('ietfworkflows_annotationtag', (
42+
('id', orm['ietfworkflows.AnnotationTag:id']),
43+
('name', orm['ietfworkflows.AnnotationTag:name']),
44+
('workflow', orm['ietfworkflows.AnnotationTag:workflow']),
45+
('permission', orm['ietfworkflows.AnnotationTag:permission']),
46+
))
47+
db.send_create_signal('ietfworkflows', ['AnnotationTag'])
48+
49+
# Adding model 'AnnotationTagObjectRelation'
50+
db.create_table('ietfworkflows_annotationtagobjectrelation', (
51+
('id', orm['ietfworkflows.AnnotationTagObjectRelation:id']),
52+
('content_type', orm['ietfworkflows.AnnotationTagObjectRelation:content_type']),
53+
('content_id', orm['ietfworkflows.AnnotationTagObjectRelation:content_id']),
54+
('annotation_tag', orm['ietfworkflows.AnnotationTagObjectRelation:annotation_tag']),
55+
))
56+
db.send_create_signal('ietfworkflows', ['AnnotationTagObjectRelation'])
57+
58+
59+
60+
def backwards(self, orm):
61+
62+
# Deleting model 'WGWorkflow'
63+
db.delete_table('ietfworkflows_wgworkflow')
64+
65+
# Deleting model 'ObjectWorkflowHistoryEntry'
66+
db.delete_table('ietfworkflows_objectworkflowhistoryentry')
67+
68+
# Deleting model 'ObjectAnnotationTagHistoryEntry'
69+
db.delete_table('ietfworkflows_objectannotationtaghistoryentry')
70+
71+
# Deleting model 'AnnotationTag'
72+
db.delete_table('ietfworkflows_annotationtag')
73+
74+
# Deleting model 'AnnotationTagObjectRelation'
75+
db.delete_table('ietfworkflows_annotationtagobjectrelation')
76+
77+
78+
79+
models = {
80+
'contenttypes.contenttype': {
81+
'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"},
82+
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
83+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
84+
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
85+
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
86+
},
87+
'ietfworkflows.annotationtag': {
88+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
89+
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
90+
'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Permission']", 'null': 'True', 'blank': 'True'}),
91+
'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'annotation_tags'", 'to': "orm['workflows.Workflow']"})
92+
},
93+
'ietfworkflows.annotationtagobjectrelation': {
94+
'annotation_tag': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ietfworkflows.AnnotationTag']"}),
95+
'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
96+
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'annotation_tags'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
97+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
98+
},
99+
'ietfworkflows.objectannotationtaghistoryentry': {
100+
'change_date': ('django.db.models.fields.DateTimeField', [], {}),
101+
'comment': ('django.db.models.fields.TextField', [], {}),
102+
'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
103+
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'annotation_tags_history'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
104+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
105+
'setted': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
106+
'unsetted': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
107+
},
108+
'ietfworkflows.objectworkflowhistoryentry': {
109+
'comment': ('django.db.models.fields.TextField', [], {}),
110+
'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
111+
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'workflow_history'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
112+
'from_state': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
113+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
114+
'to_state': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
115+
'transition_date': ('django.db.models.fields.DateTimeField', [], {})
116+
},
117+
'ietfworkflows.wgworkflow': {
118+
'workflow_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['workflows.Workflow']", 'unique': 'True', 'primary_key': 'True'})
119+
},
120+
'permissions.permission': {
121+
'codename': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
122+
'content_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
123+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
124+
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
125+
},
126+
'workflows.state': {
127+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
128+
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
129+
'transitions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['workflows.Transition']", 'null': 'True', 'blank': 'True'}),
130+
'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'states'", 'to': "orm['workflows.Workflow']"})
131+
},
132+
'workflows.transition': {
133+
'condition': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
134+
'destination': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'destination_state'", 'null': 'True', 'to': "orm['workflows.State']"}),
135+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
136+
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
137+
'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Permission']", 'null': 'True', 'blank': 'True'}),
138+
'workflow': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'transitions'", 'to': "orm['workflows.Workflow']"})
139+
},
140+
'workflows.workflow': {
141+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
142+
'initial_state': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'workflow_state'", 'null': 'True', 'to': "orm['workflows.State']"}),
143+
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
144+
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['permissions.Permission']", 'symmetrical': 'False'})
145+
}
146+
}
147+
148+
complete_apps = ['ietfworkflows']

ietf/ietfworkflows/migrations/__init__.py

Whitespace-only changes.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
2+
from south.db import db
3+
from django.db import models
4+
from permissions.models import *
5+
6+
class Migration:
7+
8+
def forwards(self, orm):
9+
10+
# Adding model 'Role'
11+
db.create_table('permissions_role', (
12+
('id', orm['permissions.Role:id']),
13+
('name', orm['permissions.Role:name']),
14+
))
15+
db.send_create_signal('permissions', ['Role'])
16+
17+
# Adding model 'ObjectPermissionInheritanceBlock'
18+
db.create_table('permissions_objectpermissioninheritanceblock', (
19+
('id', orm['permissions.ObjectPermissionInheritanceBlock:id']),
20+
('permission', orm['permissions.ObjectPermissionInheritanceBlock:permission']),
21+
('content_type', orm['permissions.ObjectPermissionInheritanceBlock:content_type']),
22+
('content_id', orm['permissions.ObjectPermissionInheritanceBlock:content_id']),
23+
))
24+
db.send_create_signal('permissions', ['ObjectPermissionInheritanceBlock'])
25+
26+
# Adding model 'ObjectPermission'
27+
db.create_table('permissions_objectpermission', (
28+
('id', orm['permissions.ObjectPermission:id']),
29+
('role', orm['permissions.ObjectPermission:role']),
30+
('permission', orm['permissions.ObjectPermission:permission']),
31+
('content_type', orm['permissions.ObjectPermission:content_type']),
32+
('content_id', orm['permissions.ObjectPermission:content_id']),
33+
))
34+
db.send_create_signal('permissions', ['ObjectPermission'])
35+
36+
# Adding model 'Permission'
37+
db.create_table('permissions_permission', (
38+
('id', orm['permissions.Permission:id']),
39+
('name', orm['permissions.Permission:name']),
40+
('codename', orm['permissions.Permission:codename']),
41+
))
42+
db.send_create_signal('permissions', ['Permission'])
43+
44+
# Adding model 'PrincipalRoleRelation'
45+
db.create_table('permissions_principalrolerelation', (
46+
('id', orm['permissions.PrincipalRoleRelation:id']),
47+
('user', orm['permissions.PrincipalRoleRelation:user']),
48+
('group', orm['permissions.PrincipalRoleRelation:group']),
49+
('role', orm['permissions.PrincipalRoleRelation:role']),
50+
('content_type', orm['permissions.PrincipalRoleRelation:content_type']),
51+
('content_id', orm['permissions.PrincipalRoleRelation:content_id']),
52+
))
53+
db.send_create_signal('permissions', ['PrincipalRoleRelation'])
54+
55+
# Adding ManyToManyField 'Permission.content_types'
56+
db.create_table('permissions_permission_content_types', (
57+
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
58+
('permission', models.ForeignKey(orm.Permission, null=False)),
59+
('contenttype', models.ForeignKey(orm['contenttypes.ContentType'], null=False))
60+
))
61+
62+
63+
64+
def backwards(self, orm):
65+
66+
# Deleting model 'Role'
67+
db.delete_table('permissions_role')
68+
69+
# Deleting model 'ObjectPermissionInheritanceBlock'
70+
db.delete_table('permissions_objectpermissioninheritanceblock')
71+
72+
# Deleting model 'ObjectPermission'
73+
db.delete_table('permissions_objectpermission')
74+
75+
# Deleting model 'Permission'
76+
db.delete_table('permissions_permission')
77+
78+
# Deleting model 'PrincipalRoleRelation'
79+
db.delete_table('permissions_principalrolerelation')
80+
81+
# Dropping ManyToManyField 'Permission.content_types'
82+
db.delete_table('permissions_permission_content_types')
83+
84+
85+
86+
models = {
87+
'auth.group': {
88+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
89+
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
90+
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'})
91+
},
92+
'auth.permission': {
93+
'Meta': {'unique_together': "(('content_type', 'codename'),)"},
94+
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
95+
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
96+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
97+
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
98+
},
99+
'auth.user': {
100+
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
101+
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
102+
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
103+
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'blank': 'True'}),
104+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
105+
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
106+
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
107+
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
108+
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
109+
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
110+
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
111+
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}),
112+
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
113+
},
114+
'contenttypes.contenttype': {
115+
'Meta': {'unique_together': "(('app_label', 'model'),)", 'db_table': "'django_content_type'"},
116+
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
117+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118+
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
119+
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
120+
},
121+
'permissions.objectpermission': {
122+
'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
123+
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
124+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
125+
'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Permission']"}),
126+
'role': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Role']", 'null': 'True', 'blank': 'True'})
127+
},
128+
'permissions.objectpermissioninheritanceblock': {
129+
'content_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
130+
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
131+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
132+
'permission': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Permission']"})
133+
},
134+
'permissions.permission': {
135+
'codename': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
136+
'content_types': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
137+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
138+
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
139+
},
140+
'permissions.principalrolerelation': {
141+
'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
142+
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
143+
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}),
144+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
145+
'role': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['permissions.Role']"}),
146+
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
147+
},
148+
'permissions.role': {
149+
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
150+
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
151+
}
152+
}
153+
154+
complete_apps = ['permissions']

permissions/migrations/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)