Merge lp:~ronnie.vd.c/loco-team-portal/494950_db_approved into lp:loco-team-portal

Proposed by Ronnie
Status: Needs review
Proposed branch: lp:~ronnie.vd.c/loco-team-portal/494950_db_approved
Merge into: lp:loco-team-portal
Diff against target: 128 lines (+124/-0)
1 file modified
loco_directory/teams/migrations/0013_auto__chg_field_team_approved_date.py (+124/-0)
To merge this branch: bzr merge lp:~ronnie.vd.c/loco-team-portal/494950_db_approved
Reviewer Review Type Date Requested Status
Michael Hall (community) Needs Information
Review via email: mp+50312@code.launchpad.net

Description of the change

Added migration file for approved_date (DateTimeField to DateField)

To post a comment you must log in.
Revision history for this message
Ronnie (ronnie.vd.c) wrote :

Could we make an sql file to do the trick

Revision history for this message
Michael Hall (mhall119) wrote :

Refresh my memory, is this the field that was changed in the database on production, but not through a migration file? If so, we will need to take care in deploying this to production.

review: Needs Information
Revision history for this message
Ronnie (ronnie.vd.c) wrote :

Prod needs some custom sql fix for this. I guess the change was made before
south was used and is never corrected. Shouldn't be that hard I guess
Op 9 feb. 2012 16:16 schreef "Michael Hall" <email address hidden> het
volgende:

> Review: Needs Information
>
> Refresh my memory, is this the field that was changed in the database on
> production, but not through a migration file? If so, we will need to take
> care in deploying this to production.
> --
>
> https://code.launchpad.net/~ronnie.vd.c/loco-team-portal/494950_db_approved/+merge/50312
> You are the owner of lp:~ronnie.vd.c/loco-team-portal/494950_db_approved.
>

Unmerged revisions

399. By Ronnie

Added migration for team reapproval

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'loco_directory/teams/migrations/0013_auto__chg_field_team_approved_date.py'
--- loco_directory/teams/migrations/0013_auto__chg_field_team_approved_date.py 1970-01-01 00:00:00 +0000
+++ loco_directory/teams/migrations/0013_auto__chg_field_team_approved_date.py 2011-02-18 11:51:58 +0000
@@ -0,0 +1,124 @@
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 # Changing field 'Team.approved_date'
12 db.alter_column('teams', 'approved_date', self.gf('django.db.models.fields.DateField')(null=True))
13
14
15 def backwards(self, orm):
16
17 # Changing field 'Team.approved_date'
18 db.alter_column('teams', 'approved_date', self.gf('django.db.models.fields.DateTimeField')(null=True))
19
20
21
22 models = {
23 'auth.group': {
24 'Meta': {'object_name': 'Group'},
25 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
26 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
27 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
28 },
29 'auth.permission': {
30 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
31 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
32 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
33 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
34 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
35 },
36 'auth.user': {
37 'Meta': {'object_name': 'User'},
38 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
39 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
40 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
41 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
42 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
43 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
44 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
45 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
46 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
47 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
48 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
49 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
50 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
51 },
52 'contenttypes.contenttype': {
53 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
54 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
55 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
56 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
57 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
58 },
59 'teams.continent': {
60 'Meta': {'ordering': "('name',)", 'object_name': 'Continent'},
61 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62 'name': ('django.db.models.fields.TextField', [], {'max_length': '50'})
63 },
64 'teams.country': {
65 'Meta': {'ordering': "('name',)", 'object_name': 'Country'},
66 'continents': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Continent']", 'symmetrical': 'False'}),
67 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
68 'name': ('django.db.models.fields.TextField', [], {'max_length': '100'})
69 },
70 'teams.language': {
71 'Meta': {'ordering': "('name',)", 'object_name': 'Language'},
72 'code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True'}),
73 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
74 'name': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True'})
75 },
76 'teams.team': {
77 'Meta': {'ordering': "('approved', 'name')", 'object_name': 'Team', 'db_table': "'teams'"},
78 'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
79 'admin_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'admins'", 'symmetrical': 'False', 'to': "orm['userprofiles.UserProfile']"}),
80 'approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
81 'approved_date': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
82 'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
83 'contact_profiles': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'contacts'", 'symmetrical': 'False', 'to': "orm['userprofiles.UserProfile']"}),
84 'countries': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Country']", 'symmetrical': 'False'}),
85 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
86 'expires_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
87 'flickr_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
88 'forum_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
89 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'irc_chan': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}),
91 'languages': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['teams.Language']", 'symmetrical': 'False'}),
92 'lp_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True'}),
93 'microbloghashtag': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
94 'ml_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
95 'mugshot_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
96 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True'}),
97 'owner_profile': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owner'", 'null': 'True', 'to': "orm['userprofiles.UserProfile']"}),
98 'picasa_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
99 'pixie_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
100 'provides_support': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
101 'spr': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
102 'web_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
103 'wiki_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
104 },
105 'userprofiles.userprofile': {
106 'Meta': {'ordering': "('user__username',)", 'object_name': 'UserProfile'},
107 'aim': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
108 'blog': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
109 'facebook': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
110 'flickr': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
111 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
112 'identica': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
113 'irc': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
114 'mugshot': ('django.db.models.fields.URLField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
115 'picasa': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
116 'realname': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
117 'twitter': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
118 'tz': ('django.db.models.fields.CharField', [], {'default': "'UTC'", 'max_length': '32'}),
119 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'}),
120 'xmpp': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'})
121 }
122 }
123
124 complete_apps = ['teams']

Subscribers

People subscribed via source and target branches