From b2cd0870a3379cc378cb460c6e66af788b62fed5 Mon Sep 17 00:00:00 2001
From: Tobias Brunner <tobias@strongswan.org>
Date: Tue, 11 Feb 2014 20:50:32 +0100
Subject: sql: Set default values for some fields in addresses table

---
 src/libcharon/plugins/sql/sqlite.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/libcharon/plugins/sql/sqlite.sql')

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 (
-- 
cgit v1.2.3

