Changes between Version 23 and Version 24 of UserGuidelines/Admin/DataMigration/Haiti


Ignore:
Timestamp:
01/22/10 00:02:36 (12 years ago)
Author:
Praneeth Bodduluri
Comment:

Added migration notes

Legend:

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

    v23 v24  
    2322321) sqlite does seems to treat emails with different capitalizations as different entities. MySQL does not and can cause a problem during import if data is not clean.[[BR]]
    233233
    234 2) Use of the INNODB engine for the db can lead to Integrity Errors during the first run and import -> Recommend MyISAM for now.
     2342) SQLite doesn't support FOREIGN KEY constraints, neither does MySQL with MyISAM tables.
     235
     236
     237=== Migration plan ===
     238
     2391) Put the site in read only mode -> Disable Login, Kill existing sessions[[BR]]
     2402) Export the CSV from web2py shell[[BR]]
     2413) Create a MyISAM database(say name = sahana) in mysql[[BR]]
     2424) Disable zzz_1st_run.py and zzz_last.py[[BR]]
     2435) Switch the settings in 00_db.py to mysql and do a [[BR]]
     244
     245{{{
     246python web2py.py -S sahana -M -N
     247db.commit()
     248CTRL+Z
     249}}}
     250
     251
     2526) Drop the tweets and sms data and their corresponding GIS [ Check for any pledges ][[BR]]
     253
     2547) Split the data into the 5 csv's as follows(say db1.csv, db2.csv,..) - Deleting other tables.[[BR]]
     255
     256{{{
     257TABLE auth_event
     258TABLE admin_theme
     259TABLE s3_audit
     260TABLE s3_setting
     261TABLE s3_source
     262TABLE appadmin_setting
     263===========================
     264TABLE pr_setting
     265TABLE pr_pentity
     266TABLE pr_person
     267TABLE pr_group
     268===========================
     269TABLE gis_setting
     270TABLE gis_marker
     271TABLE gis_projection
     272TABLE gis_symbology
     273TABLE gis_config
     274TABLE gis_feature_class
     275TABLE gis_symbology_to_feature_class
     276TABLE gis_location
     277TABLE gis_feature_group
     278TABLE gis_location_to_feature_group
     279TABLE gis_feature_class_to_feature_group
     280TABLE gis_apikey
     281TABLE gis_track
     282TABLE gis_layer_openstreetmap
     283TABLE gis_layer_google
     284TABLE gis_layer_yahoo
     285TABLE gis_layer_gpx
     286TABLE gis_layer_georss
     287TABLE gis_layer_kml
     288TABLE gis_layer_wms
     289TABLE gis_layer_tms
     290TABLE gis_layer_xyz
     291TABLE gis_layer_js
     292============================
     293TABLE pr_contact
     294TABLE or_setting
     295TABLE or_sector
     296TABLE or_organisation
     297TABLE or_office
     298TABLE or_contact
     299TABLE or_project
     300TABLE or_activity
     301TABLE lms_setting
     302TABLE lms_catalog
     303TABLE rms_setting
     304TABLE admin_setting
     305TABLE budget_setting
     306TABLE cr_setting
     307TABLE dvi_setting
     308TABLE dvr_setting
     309TABLE hrm_setting
     310TABLE mobile_setting
     311TABLE mpr_setting
     312TABLE msg_setting
     313TABLE sync_setting
     314TABLE vol_setting
     315
     316}}}
     317
     3188) Remove duplicates in the auth_user ( only Linda* when I checked) and pr_person[[BR]]
     319
     3209) Clean up gis_layer_js -> make multi lined records single lined[[BR]]
     321
     32210) In or_organisation -> remove "Medecins du Monde France" entry as "Médecins du Monde France" is treated as the same in MySQL[[BR]]
     323
     32411) Clean up multi lined records in or_organisation.[[BR]]
     325
     32612) Test import - multilined entries give a "raise SyntaxError, 'invalid file format' [[BR]]
     327
     32813) or_sector does not have entries 14,15,16 - which are in the database associated with some organisations - Fix them[[BR]]
     329
     33014) Check that the site is completely functional.[[BR]]
     331
     33215) Go to phpmyadmin and export the entire db as sql.[[BR]]
     333
     33416) Replace all MyISAM lines in the sql with INNODB[[BR]]
     335
     33617) Drop the datbase using phpmyadmin and import the previously created sql[[BR]]
     337
     33818) Test everything once.[[BR]]
     339
     34019) Switch this to production[[BR]]
     341
     342Estimated time for migration: 1 hour
    235343
    236344----