aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/plugins/medsrv/mysql.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/plugins/medsrv/mysql.sql')
-rw-r--r--src/charon/plugins/medsrv/mysql.sql29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/charon/plugins/medsrv/mysql.sql b/src/charon/plugins/medsrv/mysql.sql
index 0fb60dbc6..8f4ba34a9 100644
--- a/src/charon/plugins/medsrv/mysql.sql
+++ b/src/charon/plugins/medsrv/mysql.sql
@@ -1,12 +1,21 @@
-CREATE TABLE IF NOT EXISTS `Peer` (
- `IdPeer` int(10) unsigned NOT NULL auto_increment,
- `IdUser` int(10) unsigned NOT NULL,
- `Alias` varchar(30) collate utf8_unicode_ci NOT NULL,
- `KeyId` varbinary(20) NOT NULL,
- `PublicKey` blob NOT NULL,
- PRIMARY KEY (`IdPeer`),
- KEY `KeyId` (`KeyId`),
- KEY `IdUser` (`IdUser`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+CREATE TABLE IF NOT EXISTS `peer` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `user` int(10) unsigned NOT NULL,
+ `alias` varchar(30) NOT NULL,
+ `keyid` varbinary(20) NOT NULL,
+ `public_key` blob,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY (`user`,`alias`),
+ UNIQUE KEY (`keyid`),
+ KEY `user` (`user`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE TABLE IF NOT EXISTS `user` (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `login` varchar(30) NOT NULL,
+ `password` varbinary(20) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY (`login`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;