-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sql
More file actions
18 lines (15 loc) · 829 Bytes
/
script.sql
File metadata and controls
18 lines (15 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CREATE DATABASE IF NOT EXISTS systemtrack;
USE systemtrack;
CREATE TABLE IF NOT EXISTS `usuarios` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`senha_hash` varchar(255) NOT NULL,
`tipo_conta` varchar(50) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email_UNIQUE` (`email`)
);
-- Senha Criptografada (SHA256 para '123456' em minúsculo, baseada na lógica da classe AccountController):
-- SHA256('123456') = 8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92
INSERT INTO `usuarios` (`email`, `senha_hash`, `tipo_conta`)
VALUES ('arthurbig12@gmail.com', '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', 'administrador')
ON DUPLICATE KEY UPDATE `senha_hash` = '8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92', `tipo_conta` = 'administrador';