IMSMA3 script changes 6.0

From IMSMA Wiki
Revision as of 20:21, 23 June 2014 by Alnaucler (talk | contribs) (Created page with "{{TOC right}} ==Importing data to PostGreSQL==__NOEDITSECTION__ If you have imported data to temporary tables, you need to double-check how your data looks like after import ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Importing data to PostGreSQL

If you have imported data to temporary tables, you need to double-check how your data looks like after import to PostGreSQL. There are changes in date format and boolean compared to MySQL.

Configuration files

Compared to IMSMANG 5.08.04 these rows are changed:

  1. MIGRATION_FROM_TYPE=6.0
  2. MIGRATION_TO_TYPE=6.0
  3. IMSMA_6.0_JDBC_URL=jdbc:postgresql://localhost:5432/imsma
  4. IMSMA_6.0_Driver=org.postgresql.Driver
  5. IMSMA_6.0_User=imsma
  6. IMSMA_6.0_Password=password

Scripts

Due to PostGreSQL is case sensitive you need to adopt SQL statements by adding " around column names that contains capital case and because of the " you also need to add \ (escape character).

5.08.04 example

SELECT Loc_VillageGUID, mMREID FROM loc_link_mre WHERE loc_link_mre.Loc_VillageGUID IS NOT NULL

need to be changed to

SELECT \"Loc_VillageGUID\", \"mMREID\" FROM loc_link_mre WHERE \"Loc_VillageGUID\" IS NOT NULL