/*
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR

This file is part of HOTMapper.

HOTMapper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

HOTMapper is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with HOTMapper.  If not, see <https://www.gnu.org/licenses/>.
*/

CREATE TABLE siope_mun (
    ano_censo       INT NOT NULL,
    estado_id       INT NOT NULL,
    municipio_id    INT NOT NULL,
    total_impostos  FLOAT,
    total_mde       FLOAT,
    fundeb          FLOAT,
    CONSTRAINT pk_siope_mun_id PRIMARY KEY (ano_censo,municipio_id),
    CONSTRAINT siope_mun_fk_estado_id FOREIGN KEY (estado_id) REFERENCES estado(id),
    CONSTRAINT siope_mun_fk_municipio_id FOREIGN KEY (municipio_id) REFERENCES municipio(id)
);
