29 lines
543 B
MySQL
29 lines
543 B
MySQL
|
drop database if exists foxtrot_mfa;
|
||
|
|
||
|
create database foxtrot_mfa;
|
||
|
|
||
|
grant all privileges on foxtrot_mfa.* to foxtrot@localhost;
|
||
|
|
||
|
use foxtrot_mfa;
|
||
|
|
||
|
create table users
|
||
|
(
|
||
|
id uuid DEFAULT uuid() PRIMARY KEY,
|
||
|
username varchar(255),
|
||
|
password varchar(255),
|
||
|
otpSecret varchar(255),
|
||
|
creationTime timestamp
|
||
|
);
|
||
|
|
||
|
create table certs
|
||
|
(
|
||
|
id uuid DEFAULT uuid() PRIMARY KEY,
|
||
|
userID uuid,
|
||
|
FOREIGN KEY (userID) REFERENCES users(id),
|
||
|
pkcs12 BLOB,
|
||
|
creationTime timestamp
|
||
|
);
|
||
|
|
||
|
|
||
|
insert into users ( id, username, password) values ( uuid(), "test", "test");
|