From 491464355911334ecbf49b742545286e82961112 Mon Sep 17 00:00:00 2001
From: plegall <plg@piwigo.org>
Date: Mon, 18 Jan 2016 14:02:40 +0100
Subject: bug #404 fixed, database changes for auth keys

... applied during install: table user_auth_keys and column history.auth_key_id
---
 install/piwigo_structure-mysql.sql | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

(limited to 'install/piwigo_structure-mysql.sql')

diff --git a/install/piwigo_structure-mysql.sql b/install/piwigo_structure-mysql.sql
index 24c386abf..0c50701c0 100644
--- a/install/piwigo_structure-mysql.sql
+++ b/install/piwigo_structure-mysql.sql
@@ -132,6 +132,7 @@ CREATE TABLE `piwigo_history` (
   `summarized` enum('true','false') default 'false',
   `image_type` enum('picture','high','other') default NULL,
   `format_id` int(11) unsigned default NULL,
+  `auth_key_id` int(11) unsigned DEFAULT NULL,
   PRIMARY KEY  (`id`),
   KEY `history_i1` (`summarized`)
 ) ENGINE=MyISAM;
@@ -365,6 +366,20 @@ CREATE TABLE `piwigo_user_access` (
   PRIMARY KEY  (`user_id`,`cat_id`)
 ) ENGINE=MyISAM;
 
+--
+-- Table structure for table `piwigo_user_auth_keys`
+--
+
+CREATE TABLE `piwigo_user_auth_keys` (
+  `auth_key_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `auth_key` varchar(255) NOT NULL,
+  `user_id` mediumint(8) unsigned NOT NULL,
+  `created_on` datetime NOT NULL,
+  `duration` int(11) unsigned DEFAULT NULL,
+  `expired_on` datetime NOT NULL,
+  PRIMARY KEY (`auth_key_id`)
+) ENGINE=MyISAM;
+
 --
 -- Table structure for table `piwigo_user_cache`
 --
-- 
cgit v1.2.3

