Changes between Version 19 and Version 20 of UserGuidelines/Admin/DataMigration/Haiti
- Timestamp:
- 01/20/10 22:04:09 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuidelines/Admin/DataMigration/Haiti
v19 v20 118 118 }}} 119 119 ==== Dealing with database corruption ==== 120 We had problems with the or_organisation table - queries wouldn't complete.120 1. We had problems with the or_organisation table - queries wouldn't complete. 121 121 122 122 The tracebacks included: {{{ValueError: invalid literal for int() with base 10: '01/14/10 1'}}} 123 124 By commenting out each field in turn in the model, discovered that this was the timestamp column which included this data. 125 126 (Note the file was also {{{chown root:root}}}!) 127 123 128 To fix this we needed to: 124 129 * Delete column from model … … 157 162 Ctrl+D 158 163 }}} 164 165 2. rms_sms_request table couldn't be recreated 166 167 Since this part of the system is under active development, it was necessary to drop the table as part of the [wiki:ReleaseManagement release process]. 168 * Although normally we can re-populate the tables from their source feeds simply using: 169 {{{ 170 cd /home/haiti/web2py 171 python web2py.py -S prod -M -N 172 feature_class_id = db(db.gis_feature_class.name == 'SMS').select().first().id 173 db(db.gis_location.feature_class_id == feature_class_id).delete() 174 db.rms_tweet_request.truncate() 175 db.rms_sms_request.truncate() 176 db.commit() 177 Ctrl+D 178 }}} 179 180 However this didn't complete fully as there was still an associated view file in {{{databases/}}} & hence when model tries to create: 181 * {{{SyntaxError: invalid table name: rms_sms_request}}} 182 183 To resolve this 159 184 === Web Services === 160 185 Better to avoid locks & do without SSH login