CREATE SEQUENCE margen_reportes_id_report_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 1
  CACHE 1;
ALTER TABLE margen_reportes_id_report_seq
  OWNER TO postgres;


CREATE TABLE "public"."margen_reportes" (
"id_report" int8 DEFAULT nextval('margen_reportes_id_report_seq'::regclass) NOT NULL,
"margen_top" varchar(10) COLLATE "default",
"margen_boton" varchar(10) COLLATE "default",
"margen_left" varchar(10) COLLATE "default",
"margen_right" varchar(10) COLLATE "default",
"cabecera" bool,
"url_cabecera" varchar(250) COLLATE "default",
"id_headquarter" uuid
)
WITH (OIDS=FALSE);
ALTER TABLE "public"."margen_reportes" ADD PRIMARY KEY ("id_report");

-- ----------------------------
-- Foreign Key structure for table "public"."margen_reportes"
-- ----------------------------
ALTER TABLE "public"."margen_reportes" ADD FOREIGN KEY ("id_headquarter") REFERENCES "public"."headquarter" ("id_headquarter") ON DELETE NO ACTION ON UPDATE NO ACTION;


ALTER TABLE "public"."margen_reportes"
ADD COLUMN "current" timestamp;

