--
-- USUARIOS
--
CREATE TABLE usuarios (
    codigocli BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    usuario VARCHAR(20) NOT NULL,
    senha VARCHAR(10) NOT NULL,
    PRIMARY KEY (codigocli)
) ENGINE=InnoDB;

INSERT INTO usuarios VALUES
(0, 'roberto', '123456');



--
-- DOCUMENTOS
--
CREATE TABLE documentos (
	id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
	codigocli BIGINT UNSIGNED NOT NULL,
	caminho VARCHAR(250) NOT NULL,
	documento VARCHAR(150) NOT NULL,
	PRIMARY KEY (id),
	FOREIGN KEY (codigocli) REFERENCES usuarios (codigocli) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB;