aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/plugins/sql/mysql.sql
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-05-09 15:01:22 +0000
committerMartin Willi <martin@strongswan.org>2008-05-09 15:01:22 +0000
commit6cf1215e3ce19e949450c66b7c8fe71bdce6bdd5 (patch)
tree5ffc99aa224725fd1289f9f3c2be8c5b39983883 /src/charon/plugins/sql/mysql.sql
parent7051ef40916451ef94f90731d489ffb4ce167d24 (diff)
downloadstrongswan-6cf1215e3ce19e949450c66b7c8fe71bdce6bdd5.tar.bz2
strongswan-6cf1215e3ce19e949450c66b7c8fe71bdce6bdd5.tar.xz
ported IP pool to mysql
Diffstat (limited to 'src/charon/plugins/sql/mysql.sql')
-rw-r--r--src/charon/plugins/sql/mysql.sql32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/charon/plugins/sql/mysql.sql b/src/charon/plugins/sql/mysql.sql
index 6c04aef68..3624abd33 100644
--- a/src/charon/plugins/sql/mysql.sql
+++ b/src/charon/plugins/sql/mysql.sql
@@ -151,6 +151,34 @@ CREATE TABLE shared_secret_identity (
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+DROP TABLE IF EXISTS pools;
+CREATE TABLE pools (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `name` varchar(32) NOT NULL,
+ `start` varbinary(16) NOT NULL,
+ `end` varbinary(16) NOT NULL,
+ `next` varbinary(16) NOT NULL,
+ `timeout` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+
+DROP TABLE IF EXISTS leases;
+CREATE TABLE leases (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `pool` int(10) unsigned NOT NULL,
+ `address` varbinary(16) NOT NULL,
+ `identity` int(10) unsigned NOT NULL,
+ `acquired` int(10) unsigned NOT NULL,
+ `released` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ INDEX (`pool`),
+ INDEX (`identity`),
+ INDEX (`released`)
+);
+
+
DROP TABLE IF EXISTS ike_sas;
CREATE TABLE ike_sas (
`local_spi` varbinary(8) NOT NULL,
@@ -164,7 +192,7 @@ CREATE TABLE ike_sas (
`host_family` tinyint(3) NOT NULL,
`local_host_data` varbinary(16) NOT NULL,
`remote_host_data` varbinary(16) NOT NULL,
- `lastuse` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `lastuse` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`local_spi`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
@@ -176,7 +204,7 @@ CREATE TABLE logs (
`signal` tinyint(3) NOT NULL,
`level` tinyint(3) NOT NULL,
`msg` varchar(256) NOT NULL,
- `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;