Changes between Version 11 and Version 12 of UserGuidelines/Admin/DataMigration/Haiti


Ignore:
Timestamp:
01/19/10 19:21:11 (15 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelines/Admin/DataMigration/Haiti

    v11 v12  
    6767./maintenance.off
    6868}}}
     69==== Changing a set of Lookup Options live ====
     70We can eaisly amend the module_resource_opts = {} live in the code (usually models/module.py) however we need to migrate existing data (after backing it up, of course):
     71{{{
     72cd /home/haiti/prod
     73bzr pull
     74
     75cd /home/haiti/web2py
     76python web2py.py -S prod -M
     77
     78db(db.or_organisation.id > 0).select().export_to_csv_file(open('orgs.csv','wb'))
     79db(db.or_organisation.type == 4).update(type='')
     80db(db.or_organisation.type == 5).update(type='')
     81db.commit()
     82Ctrl+D
     83
     84/etc/init.d/apache2 force-reload
     85}}}
     86
     87If the system is being heavily used, need to put up a holding page during this time to prevent data entry.
     88For switching on maintenance.
     89{{{
     90cd /home/haiti
     91./maintenance.on
     92}}}
     93For switching off maintenance.
     94{{{
     95cd /home/haiti
     96./maintenance.off
     97}}}
    6998=== Web Services ===
    7099Better to avoid locks & do without SSH login