Revision 5457
Added by Aaron Marcuse-Kubitza over 12 years ago
inputs/input.Makefile | ||
---|---|---|
315 | 315 |
profileOnly = -env profile_to=/dev/fd/3 $(map2db) 3>&1 1>&2|\ |
316 | 316 |
$(bin)/profile_stats /dev/fd/0 |
317 | 317 |
|
318 |
log_ = $*/logs/$(if $(n),n=$(n).,)$(date).log.sql
|
|
318 |
log_ = $*/logs/$(if $(n),n=$(n).,)$(version).log.sql
|
|
319 | 319 |
trace = $(log_:.log.sql=.trace) |
320 | 320 |
import = -$(if $(profileTest),$(profileOnly),(set -x; "time" env commit=1\ |
321 | 321 |
$(if $(profile),profile_to=$(trace)) $(map2db)) $(if $(log),\ |
... | ... | |
366 | 366 |
##### Editing import |
367 | 367 |
|
368 | 368 |
rotate: _always |
369 |
echo "UPDATE party SET organizationname = organizationname||'.$(date)'\
|
|
369 |
echo "UPDATE party SET organizationname = organizationname||'.$(version)'\
|
|
370 | 370 |
WHERE organizationname = '$(datasrc)';"|$(psqlAsBien) |
371 | 371 |
|
372 | 372 |
rm: _always |
Makefile | ||
---|---|---|
224 | 224 |
|
225 | 225 |
schemas/rotate: _always schemas/rotate-only schemas/public/install ; |
226 | 226 |
schemas/rotate-only: _always |
227 |
echo 'ALTER SCHEMA public RENAME TO "public.$(date)";'|$(psqlAsBien)
|
|
227 |
echo 'ALTER SCHEMA public RENAME TO "public.$(version)";'|$(psqlAsBien)
|
|
228 | 228 |
|
229 | 229 |
### py_functions |
230 | 230 |
|
Also available in: Unified diff
Makefile, input.Makefile: Use new $(version), which unlike $(date) also includes the svn revision, to version log files, etc. This way, the working copy can be put back to the way it was at the time of a given import (excluding changes to nonversioned files). This also makes it easier to get all the log files for a particular import when different tables' imports started at different times.