Edgar Rocha Mendonça - 2023-12-18 16:01:15 -
In reply to message 1 from Shaun
Hi Shaun.
I have retried this package to analyze it too and i have noticed that the file database.sql is missing.
So, I saw the source code and I have created the follow structure:
CREATE TABLE `estudante` (
`id` int(10) UNSIGNED NOT NULL,
`nome` varchar(50) NOT NULL,
`numero` varchar(50) NOT NULL,
`data` date NOT NULL,
`classe` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `presenca` (
`id` int(10) UNSIGNED NOT NULL,
`data_presenca` date NOT NULL,
`estudante_id` int(10) NOT NULL,
`presenca` int(3) NOT NULL,
`falta` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `usuarios` (
`id` int(10) UNSIGNED NOT NULL,
`nome` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`senha` varchar(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `estudante` ADD PRIMARY KEY (`id`);
ALTER TABLE `presenca` ADD PRIMARY KEY (`id`);
ALTER TABLE `usuarios` ADD PRIMARY KEY (`id`);
ALTER TABLE `estudante` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `presenca` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `usuarios` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
I tested the application after and it worked very well.
I hope I had helped you!