/*
PGSQL Data Transfer
Source Host: localhost
Source Database: dblunigiana
Target Host: localhost
Target Database: dblunigiana
Date: 2/11/2009 5:32:07 PM
*/


-- ----------------------------
-- Table structure for "public"."t_eventi"
-- ----------------------------
drop table "public"."t_eventi";
CREATE TABLE "public"."t_eventi"(
"id_eve" int4 NOT NULL DEFAULT nextval('t_eventi_id_eve_seq1'::regclass),
"id_doc" int4 ,
"id_ogg" int4 ,
"id_sog" int4 ,
"trascr_sog" varchar ,
"id_ist" int4 ,
"azione" varchar(10) ,
"tipo_proprieta" varchar ,
"prop_condivisa" bool ,
"data_da_a" _date ,
"note" text ,
"data_ins" date ,
"utente_ins" int4 ,
PRIMARY KEY ("id_eve"),
FOREIGN KEY ("id_ogg") REFERENCES "public"."t_oggetti"("id_ogg") ON UPDATE NO ACTION ON DELETE NO ACTION ,
FOREIGN KEY ("id_sog") REFERENCES "public"."t_soggetti"("id_sog") ON UPDATE NO ACTION ON DELETE NO ACTION ,
FOREIGN KEY ("id_doc") REFERENCES "public"."t_documenti"("id_doc") ON UPDATE NO ACTION ON DELETE NO ACTION ,
FOREIGN KEY ("utente_ins") REFERENCES "public"."t_utenti"("cod_utente") ON UPDATE NO ACTION ON DELETE NO ACTION ,
FOREIGN KEY ("id_ist") REFERENCES "public"."t_istituzioni"("id_ist") ON UPDATE NO ACTION ON DELETE NO ACTION 
)  WITHOUT OIDS;

CREATE INDEX "fki_" ON "public"."t_eventi" USING btree ("id_ist");

CREATE INDEX "fki_ogg" ON "public"."t_eventi" USING btree ("id_ogg");

CREATE INDEX "fki_sog" ON "public"."t_eventi" USING btree ("id_sog");

CREATE INDEX "fki_doc" ON "public"."t_eventi" USING btree ("id_doc");

CREATE INDEX "fki_ute" ON "public"."t_eventi" USING btree ("utente_ins");

-- ----------------------------
-- Records 
-- ----------------------------
INSERT INTO "public"."t_eventi" VALUES (28, 34, 94, 46, 'petrus lunensis episcopus', 1, 'finisce', 'usufrutto', 'f', '{1184-04-03,1184-04-03}', '', '2009-01-21', null);
INSERT INTO "public"."t_eventi" VALUES (30, 34, 94, 54, 'Homines de Caprognano', 1, 'inizia', 'usufrutto', 't', '{1184-04-03,1184-04-03}', '', '2009-01-21', null);
INSERT INTO "public"."t_eventi" VALUES (33, 34, 94, 57, 'homines de Villa Capagnano', 1, 'inizia', 'usufrutto', 't', '{1184-04-03,1184-04-03}', '', '2009-01-21', null);
INSERT INTO "public"."t_eventi" VALUES (32, 34, 94, 56, 'Homines de villa Marzano', 1, 'inizia', 'usufrutto', 't', '{1184-04-03,1184-04-03}', '', '2009-01-21', null);
INSERT INTO "public"."t_eventi" VALUES (31, 34, 94, 55, 'Homines de Vallecla', 1, 'inizia', 'usufrutto', 't', '{1184-04-03,1184-04-03}', '', '2009-01-21', null);
INSERT INTO "public"."t_eventi" VALUES (29, 34, 94, 53, 'Homines de Caprilliola', 1, 'inizia', 'usufrutto', 't', '{1184-04-03,1184-04-03}', '', '2009-01-21', null);
