eeg_internal/sql/schema.sql

21 lines
820 B
MySQL
Raw Normal View History

2024-02-13 15:28:30 +00:00
-- MySQL schema for the database
2024-02-10 00:59:21 +00:00
-- User table
2024-02-13 15:28:30 +00:00
CREATE TABLE user (
user_id INT PRIMARY KEY AUTO_INCREMENT,
2024-02-10 00:59:21 +00:00
user_email VARCHAR(50) NOT NULL,
user_password VARCHAR(255) NOT NULL,
user_names VARCHAR(50) NOT NULL,
user_surnames VARCHAR(50) NOT NULL,
2024-02-15 16:47:51 +00:00
user_creation DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_last_login DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
2024-02-10 00:59:21 +00:00
);
2024-02-15 21:33:46 +00:00
-- This sentence creates the first user, the super admin, with a password "123456789"
-- TODO: Change the password for the super admin to a secure one
insert into user (user_email, user_password, user_names, user_surnames)
values ('administracion@eegsac.com', '$argon2id$v=19$m=65536,t=4,p=1$TE1wdklnMEpsMDAveWhzYw$nsKg2fALcXZ8AquM7jPGBUjM3Dyg5tgbDATKMeKPtfQ', 'Administracion', 'EEGSAC');