Project

General

Profile

« Previous | Next » 

Revision 6928

schemas/Makefile: Installation: public: public%/uninstall: Fixed bug where need to remove the specified version of the public schema, not public itself. Generalized $(confirmRmPublicSchema) so it could also be used for named versions of the public schema. Inlined $(rmPublicSchema) since it's now only used in one place.

View differences:

Makefile
31 31

  
32 32
#### public
33 33

  
34
confirmRmPublicSchema = $(call confirm,WARNING: This will delete the current\
35
public schema of your VegBIEN DB!,To save it: make schemas/rotate)
34
confirmRmPublicSchema = $(call confirm,WARNING: This will delete the $(1)\
35
schema of your VegBIEN DB!,$(2))
36 36

  
37
rmPublicSchema := $(call rmSchemaCmd,public)
38

  
39 37
public/install: vegbien.sql _always
40 38
	-echo $(call mkSchemaCmd,public)|$(psqlNoSearchPath)
41 39
	<$< $(psqlNoSearchPath)
......
50 48
	<$< $(sed) 's/( )public([,; ])/\1$(@D)\2/g'|$(psqlNoSearchPath)
51 49

  
52 50
public/uninstall public%/uninstall: _always
53
	@$(confirmRmPublicSchema)
54
	echo $(rmPublicSchema)|$(psqlNoSearchPath)
51
	@$(call confirmRmPublicSchema,$(@D))
52
	echo $(call rmSchemaCmd,$(@D))|$(psqlNoSearchPath)
55 53

  
56 54
# Replaces the current public schema with the given version
57 55
public%/publish: _always
58
	@$(confirmRmPublicSchema)
59
	echo $(rmPublicSchema)\
56
	@$(call confirmRmPublicSchema,public,To save it: make schemas/rotate)
57
	echo $(call rmSchemaCmd,public)\
60 58
'ALTER SCHEMA $(@D) RENAME TO public;'|$(psqlNoSearchPath) --single-transaction
61 59

  
62 60
rename/%: _always

Also available in: Unified diff