Project

General

Profile

« Previous | Next » 

Revision 2034

Makefile: VegBIEN DB: public schema: Added schemas/rotate

View differences:

Makefile
11 11
os := $(shell uname)
12 12
forOs = $(patsubst %,%-$(filter Linux Darwin,$(os)),$(1))
13 13

  
14
# System
15
date = $(shell date +"%Y-%m-%d-%H-%M-%S")
16

  
14 17
# Terminal
15 18
esc := '['
16 19
reset := $(esc)'0m'
......
188 191
	@$(confirmRmDb)
189 192
	echo $(rmPublicSchema)|$(psqlAsBien)
190 193

  
194
schemas/rotate: _always schemas/rotate-only schemas/install ;
195
schemas/rotate-only: _always
196
	echo 'ALTER SCHEMA public RENAME TO "public.$(date)";'|$(psqlAsBien)
197

  
191 198
empty_db: _always schemas/vegbien_empty.sql
192 199
	@$(confirmRmDb)
193 200
	$(psqlAsBien) <schemas/vegbien_empty.sql

Also available in: Unified diff