Commit c1b2f723 authored by Hubert depesz Lubaczewski's avatar Hubert depesz Lubaczewski Committed by GitHub

Merge pull request #4 from paulovieira/master

add 'if not exists' to schema/table creation for versioning data.
parents cbcf4071 3ca3f23b
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment