Revision 5031
Added by Aaron Marcuse-Kubitza over 12 years ago
input.Makefile | ||
---|---|---|
222 | 222 |
%/install %/header.csv: %/create.sql _always |
223 | 223 |
($(inDatasrc); echo 'CREATE TABLE "$*" AS'; cat $<; echo ';')|"time" \ |
224 | 224 |
$(psqlAsBien) --echo-all --set=table='"$*"' $(logInstall*) |
225 |
-$(addRowNum) |
|
226 | 225 |
$(exportHeader) |
227 |
# ignore errors if create.sql already added a primary key |
|
228 |
addRowNum = echo 'ALTER TABLE "$(datasrc)"."$*"\ |
|
229 |
ADD COLUMN row_num serial NOT NULL PRIMARY KEY;'|$(psqlAsBien) $(logInstall*Add) |
|
230 | 226 |
|
231 | 227 |
%/install: _always |
232 | 228 |
$(if $(isRef),$(exportHeader),$(if $(nonXml),$(import_install_))) |
Also available in: Unified diff
input.Makefile: Staging tables installation: `%/install: %/create.sql`: Don't add a row number column to the created table because it is now added automatically to the temp table by column-based import (row-based import now also does not require a pkey for DB inputs)