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

Subscribers

People subscribed via source and target branches