addTenant.sql script
This commit is contained in:
parent
ac91b62d63
commit
f2c03c71cb
|
@ -0,0 +1,25 @@
|
|||
DO $$DECLARE
|
||||
this_version CONSTANT varchar := '00.01.023';
|
||||
BEGIN
|
||||
PERFORM * FROM "DBVersion" WHERE version = this_version;
|
||||
IF FOUND THEN RETURN; END IF;
|
||||
|
||||
CREATE TABLE public."Tenant"
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
name character varying(200) NOT NULL,
|
||||
code character varying(500) NOT NULL,
|
||||
description character varying NOT NULL,
|
||||
config text,
|
||||
is_active smallint NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL,
|
||||
updated_at timestamp without time zone NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
)
|
||||
WITH (
|
||||
OIDS = FALSE
|
||||
);
|
||||
|
||||
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.023', '2023-11-20 12:00:00.000000+02', now(), 'Add table Tenant.');
|
||||
|
||||
END$$;
|
Loading…
Reference in New Issue