From 7e150ebea2290d8e8df240eea3d51e16d9410ca0 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 2 Aug 2024 18:40:37 +0300 Subject: [PATCH] init auth, identity tables --- src/Model/Database.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Model/Database.php b/src/Model/Database.php index 28251a0c..616ef300 100644 --- a/src/Model/Database.php +++ b/src/Model/Database.php @@ -43,6 +43,17 @@ class Database ); // Init tables + $this->_connection->query(' + CREATE TABLE IF NOT EXISTS `auth` + ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + `time` INTEGER NOT NULL, + `active` INTEGER NOT NULL, + `identity` INTEGER NOT NULL, + `request` VARCHAR(1024) NOT NULL + ) + '); + $this->_connection->query(' CREATE TABLE IF NOT EXISTS `bookmark` ( @@ -77,6 +88,18 @@ class Database ) '); + $this->_connection->query(' + CREATE TABLE IF NOT EXISTS `identity` + ( + `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, + `time` INTEGER NOT NULL, + `active` INTEGER NOT NULL, + `name` VARCHAR(255), + `crt` TEXT NOT NULL, + `key` TEXT NOT NULL + ) + '); + $this->_connection->query(' CREATE TABLE IF NOT EXISTS `session` (