CREATE TABLE ie_kockazat_mintapont
(
  ie_kockazat_mintapont_kod serial NOT NULL,
  ie_kockazat_mintapont_tkod integer NOT NULL,
  szulo character varying(15),
  ertek character varying(15),
  melyseg smallint,
  sorszam smallint,
  sorszamszov character varying(40),
  szoveg text,
  engedely character varying(1),
  szuloszov character varying(30),
  eszrevetel text,
  javaslat text,
  masol boolean DEFAULT false,
  c_userid character varying(20),
  c_date date,
  c_time character varying(10),
  m_userid character varying(20),
  m_date date,
  m_time character varying(10),
  CONSTRAINT ie_kockazat_mintapont_pk1 PRIMARY KEY (ie_kockazat_mintapont_kod, ie_kockazat_mintapont_tkod),
  CONSTRAINT ie_kockazat_mintapont_fk1 FOREIGN KEY (ie_kockazat_mintapont_tkod)
      REFERENCES ie_kockazat_minta (ie_kockazat_minta_kod) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)WITH OIDS;

ALTER TABLE ie_kockazat_mintapont OWNER TO mbt;

CREATE INDEX ie_kockazat_mintapont_id1 ON ie_kockazat_mintapont (ie_kockazat_mintapont_tkod);