-- Drop table

-- DROP TABLE public.resoluciones_headquarter

CREATE TABLE resoluciones_headquarter (
	id_resoluciones int2 NOT NULL,
	id_headquarter uuid NOT NULL,
	CONSTRAINT resoluciones_headquarter_pk PRIMARY KEY (id_resoluciones, id_headquarter),
	CONSTRAINT resoluciones_headquarter_headquarter_fk FOREIGN KEY (id_headquarter) REFERENCES headquarter(id_headquarter),
	CONSTRAINT resoluciones_headquarter_resoluciones_fk FOREIGN KEY (id_resoluciones) REFERENCES resoluciones(id_resoluciones)
);

-- Permissions

ALTER TABLE resoluciones_headquarter OWNER TO postgres;
GRANT ALL ON TABLE resoluciones_headquarter TO postgres;
