-- Table: escola

-- DROP TABLE escola;

CREATE TABLE escola
(
  id serial NOT NULL,
  nome character varying(150) NOT NULL,
  provincia_id character(2) NOT NULL,
  CONSTRAINT escola_pkey PRIMARY KEY (id),
  CONSTRAINT escola_provincia_id_fkey FOREIGN KEY (provincia_id)
      REFERENCES provincia (id) MATCH FULL
      ON UPDATE CASCADE ON DELETE RESTRICT
)
WITH (
  OIDS=FALSE
);
ALTER TABLE escola
  OWNER TO postgres;
