hydra-sql/misc/compose/mariadb/init-db.d/create_database_mariadb.sql

15 lines
803 B
SQL

CREATE TABLE IF NOT EXISTS usager (
email VARCHAR ( 100 ) UNIQUE NOT NULL,
password VARCHAR ( 255 ) NOT NULL,
salt VARCHAR (255),
lastname VARCHAR ( 255 ) NOT NULL,
firstname VARCHAR ( 255 ) NOT NULL
);
INSERT INTO usager (email, password, salt, lastname, firstname) VALUES
/* Bcrypt */
('test1@test.com', '$2y$10$cpgbS9OkiH9tQTh0QOyAgeWhyg1GSTIzjAlb8DXNW5VGM.2TTPMgK', '','Locke', 'John'),
/* SHA256 */
('test2@test.com', '34631c8f2a3e00900c463a00d5eab046e9060ac6ff752fc88a0ce549e7a500d2', 'cesaltestunexemple', 'Durand', 'Isabelle'),
/* SSHA */
('test3@test.com', '{SSHA}xip81P5Ga8dx07WZJ0Y9lJ2RGapjZXNhbHRlc3R1bmF1dHJlZXhlbXBsZQ==', '', 'Dupont', 'Henri');
GRANT ALL PRIVILEGES ON lasql.* TO lasql@localhost identified by 'lasql';