From: Tobias Brunner Date: Tue, 11 Feb 2014 19:50:32 +0000 (+0100) Subject: sql: Set default values for some fields in addresses table X-Git-Tag: 5.1.2rc1~9^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2cd0870a3379cc378cb460c6e66af788b62fed5;p=thirdparty%2Fstrongswan.git sql: Set default values for some fields in addresses table --- diff --git a/src/libcharon/plugins/sql/mysql.sql b/src/libcharon/plugins/sql/mysql.sql index 0d14681766..1b437593d5 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 5c6704b475..78012630bf 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 (