Versioning

Fork/mirror of https://gitlab.com/depesz/Versioning
git clone https://ccx.te2000.cz/git/Versioning
Log | Files | Refs | README | LICENSE

commit c1b2f723f023a2daa5e086eed176ac19483ad3a7
parent cbcf40710e5ffdacd13adbb0282725616e80ff7b
Author: Hubert depesz Lubaczewski <depesz@depesz.com>
Date:   Mon,  8 Aug 2016 10:48:03 +0200

Merge pull request #4 from paulovieira/master

add 'if not exists' to schema/table creation for versioning data.
Diffstat:
Minstall.versioning.sql | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install.versioning.sql b/install.versioning.sql @@ -6,10 +6,10 @@ BEGIN; -- All functions are defined as 'RETURNS SETOF INT4' to be able to make them to RETURN literaly nothing (0 rows). -- >> RETURNS VOID<< IS similar, but it still outputs "empty line" in psql when calling. -CREATE SCHEMA _v; +CREATE SCHEMA IF NOT EXISTS _v; COMMENT ON SCHEMA _v IS 'Schema for versioning data and functionality.'; -CREATE TABLE _v.patches ( +CREATE TABLE IF NOT EXISTS _v.patches ( patch_name TEXT PRIMARY KEY, applied_tsz TIMESTAMPTZ NOT NULL DEFAULT now(), applied_by TEXT NOT NULL,