BEGIN;
CREATE sequence package_id_package_seq;
-- CREATE TABLE "package" --------------------------------------
CREATE TABLE "public"."package" ( 
	"id_package" Integer DEFAULT nextval('package_id_package_seq'::regclass) NOT NULL,
	"name_package" Text  COLLATE "pg_catalog"."default" NOT NULL,
	"id_contratos_examenes" bigint NOT NULL,
	"val_package" Double Precision DEFAULT 0 NOT NULL,
	 PRIMARY KEY ( "id_package" ) );
 ;
-- -------------------------------------------------------------

COMMIT;

BEGIN;

-- CREATE LINK "lnk_package_contratos_examenes" ----------------
ALTER TABLE "public"."package"
	ADD CONSTRAINT "lnk_package_contratos_examenes" FOREIGN KEY ( "id_contratos_examenes" )
	REFERENCES "public"."contratos_examenes" ( "id_contratos_examenes" ) MATCH FULL
	ON DELETE Cascade
	ON UPDATE Cascade;
-- -------------------------------------------------------------

COMMIT;