[RELEASE] - bump version
This commit is contained in:
5
sql/v0.5.0/001-nodes.sql
Normal file
5
sql/v0.5.0/001-nodes.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- make device index unique
|
||||
|
||||
DROP INDEX IF EXISTS public.i_nodes_type;
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS i_nodes_device ON public.nodes (device);
|
||||
6
sql/v0.5.0/002-types.sql
Normal file
6
sql/v0.5.0/002-types.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- make name index unique order by name
|
||||
|
||||
DROP INDEX IF EXISTS types_name_key;
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS types_name_key
|
||||
ON types (name ASC);
|
||||
24
sql/v0.5.0/003-type_descriptions.sql
Normal file
24
sql/v0.5.0/003-type_descriptions.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
-- Table: public.type_descriptions
|
||||
-- DROP TABLE IF EXISTS public.type_descriptions;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS public.type_descriptions
|
||||
(
|
||||
type_id uuid NOT NULL,
|
||||
description character varying(1000) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
|
||||
CONSTRAINT pk_type_descriptions PRIMARY KEY (type_id),
|
||||
CONSTRAINT fk_type_descriptions_types FOREIGN KEY (type_id)
|
||||
REFERENCES public.types (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION
|
||||
ON DELETE CASCADE
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS public.type_descriptions
|
||||
OWNER to role_administrator;
|
||||
|
||||
-- Revoke all permissions from existing roles
|
||||
REVOKE ALL ON TABLE public.type_descriptions FROM role_administrator, role_maintainer, role_support, role_service;
|
||||
|
||||
-- Grant appropriate permissions
|
||||
GRANT ALL ON TABLE public.type_descriptions TO role_administrator;
|
||||
GRANT SELECT, INSERT, UPDATE ON TABLE public.type_descriptions TO role_maintainer, role_service;
|
||||
GRANT SELECT ON TABLE public.type_descriptions TO role_support;
|
||||
5
sql/v0.5.0/004-create_type_description_data.sql
Normal file
5
sql/v0.5.0/004-create_type_description_data.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- make type description for existing types
|
||||
INSERT INTO public.type_descriptions (type_id)
|
||||
SELECT id
|
||||
FROM public.types
|
||||
ON CONFLICT (type_id) DO NOTHING;
|
||||
Reference in New Issue
Block a user