diff options
author | Martin Willi <martin@strongswan.org> | 2008-05-09 15:01:22 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-05-09 15:01:22 +0000 |
commit | 6cf1215e3ce19e949450c66b7c8fe71bdce6bdd5 (patch) | |
tree | 5ffc99aa224725fd1289f9f3c2be8c5b39983883 /src/charon/plugins/sql/sqlite.sql | |
parent | 7051ef40916451ef94f90731d489ffb4ce167d24 (diff) | |
download | strongswan-6cf1215e3ce19e949450c66b7c8fe71bdce6bdd5.tar.bz2 strongswan-6cf1215e3ce19e949450c66b7c8fe71bdce6bdd5.tar.xz |
ported IP pool to mysql
Diffstat (limited to 'src/charon/plugins/sql/sqlite.sql')
-rw-r--r-- | src/charon/plugins/sql/sqlite.sql | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/charon/plugins/sql/sqlite.sql b/src/charon/plugins/sql/sqlite.sql index 97c304a16..760cf1b04 100644 --- a/src/charon/plugins/sql/sqlite.sql +++ b/src/charon/plugins/sql/sqlite.sql @@ -151,6 +151,7 @@ CREATE TABLE shared_secret_identity ( PRIMARY KEY (shared_secret, identity) ); + DROP TABLE IF EXISTS pools; CREATE TABLE pools ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, @@ -158,21 +159,23 @@ CREATE TABLE pools ( start BLOB NOT NULL, end BLOB NOT NULL, next BLOB NOT NULL, - timeout INTEGER DEFAULT NULL + timeout INTEGER DEFAULT NULL, + UNIQUE (name) ); DROP INDEX IF EXISTS pools_name; CREATE INDEX pools_name ON pools ( name ); + DROP TABLE IF EXISTS leases; CREATE TABLE leases ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, pool INTEGER NOT NULL, address BLOB NOT NULL, identity INTEGER NOT NULL, - acquire INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP, - release INTEGER DEFAULT NULL + acquired INTEGER NOT NULL, + released INTEGER DEFAULT NULL ); DROP INDEX IF EXISTS leases_pool; CREATE INDEX leases_pool ON leases ( @@ -182,11 +185,12 @@ DROP INDEX IF EXISTS leases_identity; CREATE INDEX leases_identity ON leases ( identity ); -DROP INDEX IF EXISTS leases_release; -CREATE INDEX leases_release ON leases ( - release +DROP INDEX IF EXISTS leases_released; +CREATE INDEX leases_released ON leases ( + released ); + DROP TABLE IF EXISTS ike_sas; CREATE TABLE ike_sas ( local_spi BLOB NOT NULL PRIMARY KEY, |