~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to Database_affected_changes.txt

  • Committer: franku
  • Date: 2016-04-18 13:29:23 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: somal@arcor.de-20160418132923-bfzkb5mvdr7l8mz4
added migrations to each app

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
This changes may affect our database:
 
2
 
 
3
# South:
 
4
    South is now integrated into django, see
 
5
    http://south.readthedocs.org/en/latest/releasenotes/1.0.html#library-migration-path
 
6
 
 
7
    An upgrading from old south migrations to django is decribed here:
 
8
    https://docs.djangoproject.com/en/1.9/topics/migrations/#upgrading-from-south
 
9
 
 
10
    Should be easy. I tested this with mysql and a copy from wl_alpha ... it works
 
11
    
 
12
    Currently i don't know how to manage the previous south migrations of pybb. In there
 
13
    are some tables build from scratch which haven't a model. F.e. pybb_forum_moderators
 
14
    Original migration: 
 
15
    http://bazaar.launchpad.net/~widelands-dev/widelands-website/trunk/revision/323#pybb/migrations/0001_initial.py
 
16
    http://bazaar.launchpad.net/~widelands-dev/widelands-website/trunk/revision/323#pybb/migrations/0002_auto__del_field_topic_post_count.py
 
17
 
 
18
# User model
 
19
    The current setting in settings.py:
 
20
 
 
21
    AUTH_PROFILE_MODULE = 'wlprofile.Profile'
 
22
 
 
23
    Has been removed in Django 1.7. The corresponding get_profile() method is gone away with that.
 
24
    Re: https://docs.djangoproject.com/en/1.8/releases/1.5/#auth-profile-module
 
25
    
 
26
    Found a solution for get_profile() but i am unsure with the AUTH_PROFILE_SETTING.
 
27
 
 
28
# Django-notifications
 
29
    Changing this to pinax-notification the old table do not work anymore.
 
30
    Because some tabels are changed it is not possible to get old data back. Restoring old notificationtypes
 
31
    is possible if we dump the table notification_noticetype
 
32
    $ mysqldump -u widelands -p old_db notification_noticetype > noticetype.db
 
33
    and reload it
 
34
    
 
35
    mysql -u widelands -p new_db < noticetype.db
 
36
    
 
37
    After that we have to copy the contents from notification_noticetype to notifications_noticetype
 
38
    (notice the additional s) and drop the previous reloaded table. This is possible through mysql console:
 
39
    
 
40
    $ mysql -u widelands -p db_name
 
41
    mysql> insert into notifications_noticetype select * from notification_noticetype;
 
42
    mysql> drop table notification_noticetype;
 
43
    
 
44
    Maybe there is an easier way :-)
 
45
 
 
46
# threadedcomments
 
47
    Maybe we could use django-comments and port the comments to django-comments.
 
48
    See: https://django-contrib-comments.readthedocs.org/en/latest/example.html