Project

General

Profile

« Previous | Next » 

Revision 4262

input.Makefile: Staging tables installation: %/install: Add row_num column to derived staging tables so they will have a pkey

View differences:

input.Makefile
179 179
# For staging tables which are derived by joining together other staging tables.
180 180
%/install: %/create.sql _always
181 181
	(echo 'SET search_path TO "$(datasrc)";'; echo 'CREATE TABLE "$*" AS';\
182
cat $<; echo ';'; echo 'VACUUM ANALYZE "$*";')|$(psqlAsBien) --echo-all
182
cat $<; echo ';'; \
183
echo 'ALTER TABLE "$*" ADD COLUMN row_num serial NOT NULL PRIMARY KEY;'; \
184
echo 'VACUUM ANALYZE "$*";')|$(psqlAsBien) --echo-all
183 185
	(prefix=; . $(bin)/vegbien_dest; env schema=$(datasrc) table=$* \
184 186
errors_table_only=1 $(bin)/csv2db)
185 187

  

Also available in: Unified diff