]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
libimcv: Added inactive field to device database table
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 13 Apr 2018 10:25:50 +0000 (12:25 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 27 Apr 2018 10:42:29 +0000 (12:42 +0200)
src/libimcv/imv/imv_database.c
src/libimcv/imv/tables-mysql.sql
src/libimcv/imv/tables.sql

index 0a18cd71bc6d1efee3e477383ea540a64b4e0e3e..b444abdbb866a22538e9e710a9d6793cb4d0b8df 100644 (file)
@@ -130,8 +130,9 @@ static bool create_session(private_imv_database_t *this, imv_session_t *session)
        if (!did)
        {
                this->db->execute(this->db, &did,
-                       "INSERT INTO devices (value, product) VALUES (?, ?)",
-                        DB_TEXT, device, DB_INT, pid);
+                       "INSERT INTO devices "
+                       "(value, description, product, trusted, inactive) "
+                       "VALUES (?, '', ?, 0, 0)", DB_TEXT, device, DB_INT, pid);
        }
        free(device);
 
index cf50742c3da7adc633a6790f515ba6d0646dbcea..3e23950a3d11a14f5b836b56a8104bf5f49f2b68 100644 (file)
@@ -182,7 +182,9 @@ CREATE TABLE `devices` (
   `description` VARCHAR(100) DEFAULT "",
   `value` VARCHAR(256) NOT NULL,
   `product` INTEGER REFERENCES `products`(`id`),
-  `created` INTEGER
+  `trusted` INTEGER DEFAULT 0,
+  `created` INTEGER,
+  `inactive` INTEGER DEFAULT 0
 );
 
 DROP TABLE IF EXISTS `identities`;
index b50c6ed12e34adf14b771a6b49dcba6ad956ef3e..631969ce7b6c8070cfe9c18be633f99c842c5a21 100644 (file)
@@ -204,7 +204,8 @@ CREATE TABLE devices (
   value TEXT NOT NULL,
   product INTEGER REFERENCES products(id),
   trusted INTEGER DEFAULT 0,
-  created INTEGER
+  created INTEGER,
+  inactive INTEGER DEFAULT 0
 );
 DROP INDEX IF EXISTS devices_id;
 CREATE INDEX devices_value ON devices (