mirror of
https://github.com/Yubico/yubikey-ksm.git
synced 2025-02-21 15:54:17 +01:00
Make portable.
This commit is contained in:
parent
ba0c270b76
commit
24e030ff85
19
ykksm-db.sql
19
ykksm-db.sql
@ -1,16 +1,10 @@
|
||||
-- drop database ykksm;
|
||||
create database ykksm;
|
||||
use ykksm;
|
||||
|
||||
create table yubikeys (
|
||||
id int not null auto_increment,
|
||||
|
||||
-- identities:
|
||||
serialNr int not null,
|
||||
publicName varchar(16) unique not null,
|
||||
|
||||
-- timestamps:
|
||||
created datetime not null,
|
||||
created varchar(24) not null,
|
||||
|
||||
-- the data:
|
||||
internalName varchar(12) not null,
|
||||
@ -24,14 +18,5 @@ create table yubikeys (
|
||||
active boolean default true,
|
||||
hardware boolean default true,
|
||||
|
||||
primary key (id)
|
||||
-- MySQL generates an index automatically for columns marked 'unique'
|
||||
-- if this doesn't seem to happen, add: 'key (publicName)'
|
||||
-- use, e.g., explain select * from yubikeys where publicName = 'foo';
|
||||
-- and make sure it uses a key to find the column.
|
||||
primary key (publicName)
|
||||
);
|
||||
|
||||
-- drop user ykksmreader;
|
||||
create user ykksmreader;
|
||||
grant select on ykksm.yubikeys to 'ykksmreader'@'localhost';
|
||||
flush privileges;
|
||||
|
Loading…
x
Reference in New Issue
Block a user