Installation du nouveau QBE ici
[auf_rh_dae.git] / src / qbe / django_qbe / migrations / 0002_auto__add_field_savedquery_user_updated__add_field_savedquery_user_cre.py
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 field 'SavedQuery.user_updated'
12 db.add_column('django_qbe_savedquery', 'user_updated', self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='savedquery_updator', to=orm['auth.User']), keep_default=False)
13
14 # Adding field 'SavedQuery.user_created'
15 db.add_column('django_qbe_savedquery', 'user_created', self.gf('django.db.models.fields.related.ForeignKey')(default=1, related_name='savedquery_creator', to=orm['auth.User']), keep_default=False)
16
17
18 def backwards(self, orm):
19
20 # Deleting field 'SavedQuery.user_updated'
21 db.delete_column('django_qbe_savedquery', 'user_updated_id')
22
23 # Deleting field 'SavedQuery.user_created'
24 db.delete_column('django_qbe_savedquery', 'user_created_id')
25
26
27 models = {
28 'auth.group': {
29 'Meta': {'object_name': 'Group'},
30 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
31 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
32 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
33 },
34 'auth.permission': {
35 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
36 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
37 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
38 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
39 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
40 },
41 'auth.user': {
42 'Meta': {'object_name': 'User'},
43 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
44 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
45 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
46 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
47 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
48 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
49 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
50 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
51 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
52 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
53 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
54 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
55 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
56 },
57 'contenttypes.contenttype': {
58 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
59 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
60 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
61 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
62 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
63 },
64 'django_qbe.savedquery': {
65 'Meta': {'object_name': 'SavedQuery'},
66 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
67 'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
68 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
69 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
70 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
71 'query_data': ('picklefield.fields.PickledObjectField', [], {}),
72 'user_created': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'savedquery_creator'", 'to': "orm['auth.User']"}),
73 'user_updated': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'savedquery_updator'", 'to': "orm['auth.User']"})
74 }
75 }
76
77 complete_apps = ['django_qbe']