unepwcmc/SAPI — pull request #157 by migtorres (2013-12-20 11:23:08+00:00)
Title: Import shipments from CSV file and create temp table from permits

This pull request has a finished task (importing shipments) and a work in progress task (importing permits)

1. Importing shipments:

We have two types of shipments import:

a) First time import

There are some fixes to the original table that must be done in the beginning. To do this run:

rake import:first_shipments path/to/file.csv

Unfortunately the first csv is too big to store in github. Please ask me for it.

b) Other imports

Whenever you want to add new shipments to trade_shipments table you can run:

rake import:first_shipments path/to/file.csv

2. Importing permits

I am still working on this but it is already possible to run the following command to import permits to a temporary table called (permits_import)

rake import:trade:permits