1
0
mirror of https://github.com/Yubico/yubikey-ksm.git synced 2024-12-12 12:08:55 +01:00
yubikey-ksm/ykksm-db.sql

38 lines
952 B
MySQL
Raw Permalink Normal View History

2009-04-19 06:40:15 +02:00
-- drop database ykksm;
2009-02-24 22:27:28 +01:00
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,
-- the data:
internalName varchar(12) not null,
aesKey varchar(32) not null,
lockCode varchar(12) not null,
-- key creator, typically pgp key id of key generator
creator varchar(8) not null,
-- various flags:
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.
);
2009-04-19 06:40:15 +02:00
-- drop user ykksmreader;
2009-02-24 22:27:28 +01:00
create user ykksmreader;
2009-03-18 15:53:46 +01:00
grant select on ykksm.yubikeys to 'ykksmreader'@'localhost';
2009-02-24 22:27:28 +01:00
flush privileges;