IMSMA3 script changes 6.0: Difference between revisions
Jump to navigation
Jump to search
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 ..." |
No edit summary |
||
| Line 13: | Line 13: | ||
==Scripts==__NOEDITSECTION__ | ==Scripts==__NOEDITSECTION__ | ||
=== SQL syntax===__NOEDITSECTION__ | |||
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). | 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). | ||
| Line 19: | Line 20: | ||
SELECT Loc_VillageGUID, mMREID FROM loc_link_mre WHERE loc_link_mre.Loc_VillageGUID IS NOT NULL | SELECT Loc_VillageGUID, mMREID FROM loc_link_mre WHERE loc_link_mre.Loc_VillageGUID IS NOT NULL | ||
</pre> | </pre> | ||
''' | '''needs to be changed to''' | ||
<pre> | <pre> | ||
SELECT \"Loc_VillageGUID\", \"mMREID\" FROM loc_link_mre WHERE \"Loc_VillageGUID\" IS NOT NULL | SELECT \"Loc_VillageGUID\", \"mMREID\" FROM loc_link_mre WHERE \"Loc_VillageGUID\" IS NOT NULL | ||
</pre> | </pre> | ||
=== Data type Byte===__NOEDITSECTION__ | |||
In PostGreSQL the data type Byte has been replaced with Boolean. You find all places you need to change by searching for ''Byte''. | |||
'''5.08.04 example''' | |||
<pre> | |||
Attribute.SetByte("IsActive"), Cast.Byte("1"); | |||
</pre> | |||
'''needs to be changed to''' | |||
<pre> | |||
Attribute.SetBoolean("Active"), Cast.Boolean("true"); | |||
</pre> | |||
[[Category:NAA]] | [[Category:NAA]] | ||
Revision as of 20:36, 23 June 2014
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:
- MIGRATION_FROM_TYPE=6.0
- MIGRATION_TO_TYPE=6.0
- IMSMA_6.0_JDBC_URL=jdbc:postgresql://localhost:5432/imsma
- IMSMA_6.0_Driver=org.postgresql.Driver
- IMSMA_6.0_User=imsma
- IMSMA_6.0_Password=password
Scripts
SQL syntax
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
needs to be changed to
SELECT \"Loc_VillageGUID\", \"mMREID\" FROM loc_link_mre WHERE \"Loc_VillageGUID\" IS NOT NULL
Data type Byte
In PostGreSQL the data type Byte has been replaced with Boolean. You find all places you need to change by searching for Byte. 5.08.04 example
Attribute.SetByte("IsActive"), Cast.Byte("1");
needs to be changed to
Attribute.SetBoolean("Active"), Cast.Boolean("true");