Discussão:Projeto Cuidando do Meu Bairro/Base de dados

O conteúdo da página não é suportado noutras línguas.
Fonte: Wikiversidade

Todas as tabelas[editar código-fonte]

O dump1 apresenta as seguintes tabelas:

CREATE TABLE contratos (
    id integer NOT NULL,
    numero character varying(60) NOT NULL,
    orgao text,
    data_assinatura timestamp without time zone,
    vigencia integer,
    objeto text,
    modalidade text,
    evento text,
    processo_administrativo text,
    cnpj text,
    nome_fornecedor text,
    valor numeric(19,2),
    licitacao character varying(60) NOT NULL,
    data_publicacao timestamp without time zone,
    file_url text,
    txt_file_url text
);


CREATE TABLE execucao (
    code character varying(100) NOT NULL,
    data jsonb,
    point geometry(Point),
    searched boolean
);

CREATE TABLE revenue_code (
    id integer NOT NULL,
    code character varying(30) NOT NULL,
    description text NOT NULL
);

CREATE TABLE revenue (
    id integer NOT NULL,
    original_code character varying(30) NOT NULL,
    code_id integer REFERENCES revenue_code(id),
    description text NOT NULL,
    date timestamp without time zone,
    monthly_predicted numeric(19,2),
    monthly_outcome numeric(19,2),
    economical_category integer,
    economical_subcategory integer,
    source integer,
    rubric integer,
    paragraph integer,
    subparagraph integer
);

---
--- provavelmente nao utilizadas.

CREATE TABLE lake (
    id integer NOT NULL,
    name character varying,
    geom geometry(Polygon)
);

CREATE TABLE regions (
    id integer NOT NULL,
    name character varying,
    geo geometry(Polygon)
);