Upgrade old MD5 password hashing (#822)

This commit is contained in:
jekkos committed 2016-09-01 19:12:08 +02:00
1 parent ce2c83b3f9
commit 35f9904dbe
3 files changed
+25 -5

No files matched your search

+6 -2
View File
@@ -63,7 +63,6 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
DELETE FROM `ospos_app_config` WHERE `key` = 'use_invoice_template';
-- add messages (SMS) module and permissions
UPDATE `ospos_modules` SET `sort` = 110 WHERE `name_lang_key` = 'module_config';
@@ -89,4 +88,9 @@ CREATE TABLE `ospos_sessions` (
`data` blob NOT NULL,
KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- upgrade employees table
ALTER TABLE `ospos_employees`
ADD COLUMN `hash_version` int(1) NOT NULL DEFAULT '2';
UPDATE `ospos_employees` SET `hash_version` = 1;
+1
View File
@@ -115,6 +115,7 @@ CREATE TABLE `ospos_employees` (
`password` varchar(255) NOT NULL,
`person_id` int(10) NOT NULL,
`deleted` int(1) NOT NULL DEFAULT '0',
`hash_version` int(1) NOT NULL DEFAULT '2'
UNIQUE KEY `username` (`username`),
KEY `person_id` (`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;