CREATE TABLE IF NOT EXISTS public.c_will
(
    -- Inherited from table public.reference: translation character varying(12) COLLATE pg_catalog."default" NOT NULL,
    -- Inherited from table public.reference: reference text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT c_will_pkey PRIMARY KEY (translation, reference)
)
    INHERITS (public.reference)
TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.c_will
    OWNER to pgdb;

GRANT ALL ON TABLE public.c_will TO pgdb;

CREATE TRIGGER c_will_normalize_on_insert_trigger
    BEFORE INSERT OR UPDATE 
    ON public.c_will
    FOR EACH ROW
    EXECUTE FUNCTION public.normalize_on_insert();

CREATE TABLE IF NOT EXISTS public.c_a_kingdom
(
    -- Inherited from table public.reference: translation character varying(12) COLLATE pg_catalog."default" NOT NULL,
    -- Inherited from table public.reference: reference text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT c_a_kingdom_pkey PRIMARY KEY (translation, reference)
)
    INHERITS (public.reference)
TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.c_a_kingdom
    OWNER to pgdb;

GRANT ALL ON TABLE public.c_a_kingdom TO pgdb;

CREATE TRIGGER c_a_kingdom_normalize_on_insert_trigger
    BEFORE INSERT OR UPDATE 
    ON public.c_a_kingdom
    FOR EACH ROW
    EXECUTE FUNCTION public.normalize_on_insert();

CREATE TABLE IF NOT EXISTS public.c_z_kingdom
(
    -- Inherited from table public.reference: translation character varying(12) COLLATE pg_catalog."default" NOT NULL,
    -- Inherited from table public.reference: reference text COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT c_z_kingdom_pkey PRIMARY KEY (translation, reference)
)
    INHERITS (public.reference)
TABLESPACE pg_default;

ALTER TABLE IF EXISTS public.c_z_kingdom
    OWNER to pgdb;

GRANT ALL ON TABLE public.c_z_kingdom TO pgdb;

CREATE TRIGGER c_z_kingdom_normalize_on_insert_trigger
    BEFORE INSERT OR UPDATE 
    ON public.c_z_kingdom
    FOR EACH ROW
    EXECUTE FUNCTION public.normalize_on_insert();
