Delete and Import All Voyage Info

  1. Backup databae using these instructions
  2. Run  the refresh-1.sql script located here in the repository ...etc/database/import/refresh-1.sql
  3. Modify CSV file
    • Insert new columns named iid, revision, and suggestion
    • Generate a sequence number for each iid
    • Set suggestion to 'f'
    • Set set revision to 1
  4. Make sure the file is in UTF8 format
    • PSPad seems to do a good job with this
    • Open file in PSPad and select format > UTF8
    • Save and Exit
  5. Run publishpreupdate function
  6. upload the file - must be superuser
    • open input file as a text file and copy the header row
    • past list of fields into the command:
      COPY voyages
      (<list of fields>)
      from E'\\pathto\\file' WITH NULL AS ' ' DELIMITER ','  CSV HEADER;
  7. Run publishpostupdate function
  8. Run RecreateLocationColumns.java and RecreateNormalizedlTextColumns.java
    • Change config in each program to point to the correct env.
    • Run thru eclipse 
  9. Restart tomcat
    • .../bin/shutdown.sh
    • .../bin/startup.sh