CREATE TABLE news (
    codice serial,
    news character varying NOT NULL,
    link character varying,
    target character varying,
    data date DEFAULT now() NOT NULL,
    locale character varying DEFAULT 'it'::character varying NOT NULL,
    news_lunga character varying,
    "type" integer DEFAULT 1 NOT NULL,
    datainizio date,
    datafine date,
    img integer[],
    imgw integer[],
    imgh integer[],
    imgsize integer[],
    imgnomefile character varying[],
    imgmime character varying[],
    attachment integer[],
    attachmentsize integer[],
    attachmentnomefile character varying[],
    attachmentmime character varying[],
    ordine integer DEFAULT 10 NOT NULL,
    public boolean DEFAULT false NOT NULL,
    categorie integer[],
    utenti integer[]
);

CREATE INDEX news_codice_key ON news USING btree (codice);

