aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/sql
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-02-11 20:50:32 +0100
committerTobias Brunner <tobias@strongswan.org>2014-02-12 14:08:34 +0100
commitb2cd0870a3379cc378cb460c6e66af788b62fed5 (patch)
tree1f9a5a93dd13136053f94ab15a35cf32ecaeedd9 /src/libcharon/plugins/sql
parent9942e43dc6767cd07e26c4f03154f3da3df9deac (diff)
downloadstrongswan-b2cd0870a3379cc378cb460c6e66af788b62fed5.tar.bz2
strongswan-b2cd0870a3379cc378cb460c6e66af788b62fed5.tar.xz
sql: Set default values for some fields in addresses table
Diffstat (limited to 'src/libcharon/plugins/sql')
-rw-r--r--src/libcharon/plugins/sql/mysql.sql6
-rw-r--r--src/libcharon/plugins/sql/sqlite.sql6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libcharon/plugins/sql/mysql.sql b/src/libcharon/plugins/sql/mysql.sql
index 0d1468176..1b437593d 100644
--- a/src/libcharon/plugins/sql/mysql.sql
+++ b/src/libcharon/plugins/sql/mysql.sql
@@ -211,9 +211,9 @@ CREATE TABLE addresses (
`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,
+ `identity` int(10) unsigned NOT NULL DEFAULT 0,
+ `acquired` int(10) unsigned NOT NULL DEFAULT 0,
+ `released` int(10) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
INDEX (`pool`),
INDEX (`identity`),
diff --git a/src/libcharon/plugins/sql/sqlite.sql b/src/libcharon/plugins/sql/sqlite.sql
index 5c6704b47..78012630b 100644
--- a/src/libcharon/plugins/sql/sqlite.sql
+++ b/src/libcharon/plugins/sql/sqlite.sql
@@ -206,9 +206,9 @@ CREATE TABLE addresses (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
pool INTEGER NOT NULL,
address BLOB NOT NULL,
- identity INTEGER NOT NULL,
- acquired INTEGER NOT NULL,
- released INTEGER NOT NULL
+ identity INTEGER NOT NULL DEFAULT 0,
+ acquired INTEGER NOT NULL DEFAULT 0,
+ released INTEGER NOT NULL DEFAULT 1
);
DROP INDEX IF EXISTS addresses_pool;
CREATE INDEX addresses_pool ON addresses (