libimcv: Added inactive field to device database table
This commit is contained in:
@@ -130,8 +130,9 @@ static bool create_session(private_imv_database_t *this, imv_session_t *session)
|
|||||||
if (!did)
|
if (!did)
|
||||||
{
|
{
|
||||||
this->db->execute(this->db, &did,
|
this->db->execute(this->db, &did,
|
||||||
"INSERT INTO devices (value, product) VALUES (?, ?)",
|
"INSERT INTO devices "
|
||||||
DB_TEXT, device, DB_INT, pid);
|
"(value, description, product, trusted, inactive) "
|
||||||
|
"VALUES (?, '', ?, 0, 0)", DB_TEXT, device, DB_INT, pid);
|
||||||
}
|
}
|
||||||
free(device);
|
free(device);
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,9 @@ CREATE TABLE `devices` (
|
|||||||
`description` VARCHAR(100) DEFAULT "",
|
`description` VARCHAR(100) DEFAULT "",
|
||||||
`value` VARCHAR(256) NOT NULL,
|
`value` VARCHAR(256) NOT NULL,
|
||||||
`product` INTEGER REFERENCES `products`(`id`),
|
`product` INTEGER REFERENCES `products`(`id`),
|
||||||
`created` INTEGER
|
`trusted` INTEGER DEFAULT 0,
|
||||||
|
`created` INTEGER,
|
||||||
|
`inactive` INTEGER DEFAULT 0
|
||||||
);
|
);
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `identities`;
|
DROP TABLE IF EXISTS `identities`;
|
||||||
|
|||||||
@@ -204,7 +204,8 @@ CREATE TABLE devices (
|
|||||||
value TEXT NOT NULL,
|
value TEXT NOT NULL,
|
||||||
product INTEGER REFERENCES products(id),
|
product INTEGER REFERENCES products(id),
|
||||||
trusted INTEGER DEFAULT 0,
|
trusted INTEGER DEFAULT 0,
|
||||||
created INTEGER
|
created INTEGER,
|
||||||
|
inactive INTEGER DEFAULT 0
|
||||||
);
|
);
|
||||||
DROP INDEX IF EXISTS devices_id;
|
DROP INDEX IF EXISTS devices_id;
|
||||||
CREATE INDEX devices_value ON devices (
|
CREATE INDEX devices_value ON devices (
|
||||||
|
|||||||
Reference in New Issue
Block a user