20120118-update-narcotic-data-view-state-oddb_org
<< Masa.20120119-delete-old-narcotic-code-fix-errors-oddb_org-make-export_oddbdat_by_company_name | Index | Masa.20120117-update-sbsm-update-narcotics-data-importer-fix-small-bugs-oddb_org >>
- Update narcotic data structure and process
- Check error log online
- Commits
-
- Added App#bm_package_count variable to save the total number of narcotics (oddb.org)
- Updated narcotic data structure, view, and state (oddb.org)
- Deleted App#bm_package_count variable (oddb.org)
- Added white space in the tob narcotics view, and deleted atc subheader in alphabetical view (oddb.org)
- Deleted atc subheader in narcotics alphabetical view when logged-in as admin (oddb.org)
Update narcotic data structure and process
Commit
Delete old narcotics data
ch.oddb> delete_all_narcotics
Import new narcotics data from a xls file
ch.oddb> Updater.new(self).update_btm('/home/masa/work/BTM_Excel_aus_pdf.xls')
Only once for the first time
ch.oddb> rebuild_indices 'narcotics_de'
ch.oddb> rebuild_indices 'narcotics_fr'
Note
- rebuild_indices method updates the index table format depending on etc/index_definitions.yaml file
- The contents of the index tables above is automatically updated when update_btm runs
Check error log online