Yubico/yubikey-ksm

Order of db inconsistent with personalisation tool logging

Mrten opened this issue · 1 comments

The csv that the personalisation tool generates has a different column order then
the database that is created with ykksm-db.sql. This is annoying, because you have to rearrange the columns if you import the data directly by reading the CSV (I really don't see the point of gnupg-ing it and use ykksm-import if I can just copy/paste over ssh).

Small patch:

--- ykksm-db.sql.old    2013-10-09 15:46:29.839991462 +0200
+++ ykksm-db.sql    2013-10-09 15:47:22.575991460 +0200
@@ -3,14 +3,14 @@
   serialnr int not null,
   publicname varchar(16) unique not null,

-  -- timestamps:
-  created varchar(24) not null,
-
   -- the data:
   internalname varchar(12) not null,
   aeskey varchar(32) not null,
   lockcode varchar(12) not null,

+  -- timestamps:
+  created varchar(24) not null,
+
   -- key creator, typically pgp key id of key generator
   creator varchar(8) not null,

The patch looks harmless to me, but I'd like to understand when this actually matters. Doesn't ykksm-import handle the CSV format generated by ykpers? It seems column ordering only matters if you would use mysqlimport or some other tool that doesn't understand the table semantics?