diff options
Diffstat (limited to 'src/charon/plugins/sql/mysql.sql')
-rw-r--r-- | src/charon/plugins/sql/mysql.sql | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/charon/plugins/sql/mysql.sql b/src/charon/plugins/sql/mysql.sql index f98fe71e2..412abc715 100644 --- a/src/charon/plugins/sql/mysql.sql +++ b/src/charon/plugins/sql/mysql.sql @@ -157,15 +157,14 @@ CREATE TABLE pools ( `name` varchar(32) NOT NULL, `start` varbinary(16) NOT NULL, `end` varbinary(16) NOT NULL, - `next` varbinary(16) NOT NULL, `timeout` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -DROP TABLE IF EXISTS leases; -CREATE TABLE leases ( +DROP TABLE IF EXISTS addresses; +CREATE TABLE addresses ( `id` int(10) unsigned NOT NULL auto_increment, `pool` int(10) unsigned NOT NULL, `address` varbinary(16) NOT NULL, @@ -175,7 +174,17 @@ CREATE TABLE leases ( PRIMARY KEY (`id`), INDEX (`pool`), INDEX (`identity`), - INDEX (`released`) + INDEX (`address`) +); + +DROP TABLE IF EXISTS leases; +CREATE TABLE leases ( + `id` int(10) unsigned NOT NULL auto_increment, + `address` int(10) unsigned NOT NULL, + `identity` int(10) unsigned NOT NULL, + `acquired` int(10) unsigned NOT NULL, + `released` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) ); |