]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
sql: Set default values for some fields in addresses table
authorTobias Brunner <tobias@strongswan.org>
Tue, 11 Feb 2014 19:50:32 +0000 (20:50 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 12 Feb 2014 13:08:34 +0000 (14:08 +0100)
src/libcharon/plugins/sql/mysql.sql
src/libcharon/plugins/sql/sqlite.sql

index 0d146817663dfe19cf9486b6bf69378b497f1e56..1b437593d5eb4f66612ed5b3fe016cab306b72ff 100644 (file)
@@ -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`),
index 5c6704b47537daa2ab6da1ef6813dcae6fea2449..78012630bff1303c05f907ea33aeacce194ad37f 100644 (file)
@@ -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 (