include timestamp for when version is updated
This commit is contained in:
parent
28be11187c
commit
e2f261caa9
@ -1,7 +1,8 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE IF NOT EXISTS public.db_version (
|
||||
singleton BOOLEAN NOT NULL DEFAULT TRUE UNIQUE CHECK (singleton),
|
||||
version TEXT NOT NULL
|
||||
version TEXT NOT NULL,
|
||||
tstamp TIMESTAMP WITHOUT TIME ZONE DEFAULT NOW()
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- +goose Up
|
||||
INSERT INTO public.db_version (singleton, version) VALUES (true, 'v0.3.2')
|
||||
ON CONFLICT (singleton) DO UPDATE SET version = 'v0.3.2';
|
||||
ON CONFLICT (singleton) DO UPDATE SET (version, tstamp) = ('v0.3.2', NOW());
|
||||
|
||||
-- +goose Down
|
||||
DELETE FROM public.db_version WHERE version = 'v0.3.2';
|
||||
|
@ -1,7 +1,8 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE IF NOT EXISTS public.db_version (
|
||||
singleton BOOLEAN NOT NULL DEFAULT TRUE UNIQUE CHECK (singleton),
|
||||
version TEXT NOT NULL
|
||||
version TEXT NOT NULL,
|
||||
tstamp TIMESTAMP WITHOUT TIME ZONE DEFAULT NOW()
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- +goose Up
|
||||
INSERT INTO public.db_version (singleton, version) VALUES (true, 'v0.3.2')
|
||||
ON CONFLICT (singleton) DO UPDATE SET version = 'v0.3.2';
|
||||
ON CONFLICT (singleton) DO UPDATE SET (version, tstamp) = ('v0.3.2', NOW());
|
||||
|
||||
-- +goose Down
|
||||
DELETE FROM public.db_version WHERE version = 'v0.3.2';
|
||||
|
@ -419,6 +419,7 @@ CREATE TABLE public.blocks (
|
||||
CREATE TABLE public.db_version (
|
||||
singleton boolean DEFAULT true NOT NULL,
|
||||
version text NOT NULL,
|
||||
tstamp timestamp without time zone DEFAULT now(),
|
||||
CONSTRAINT db_version_singleton_check CHECK (singleton)
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user