mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-18 14:48:42 -05:00
Drop and recreate completely session table with new structure
This commit is contained in:
@@ -37,6 +37,9 @@ ALTER TABLE `ospos_items_taxes`
|
||||
ALTER TABLE `ospos_customers`
|
||||
ADD COLUMN `discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00';
|
||||
|
||||
|
||||
-- alter config table
|
||||
|
||||
UPDATE `ospos_app_config` SET `key` = 'receipt_show_total_discount' WHERE `key` = 'show_total_discount';
|
||||
|
||||
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
|
||||
@@ -56,6 +59,9 @@ 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';
|
||||
|
||||
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
|
||||
@@ -67,6 +73,16 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
|
||||
INSERT INTO `ospos_grants` (`permission_id`, `person_id`) VALUES
|
||||
('messages', 1);
|
||||
|
||||
ALTER TABLE `ospos_sessions`
|
||||
DROP PRIMARY KEY;
|
||||
|
||||
-- alter sessions table
|
||||
|
||||
DROP TABLE `ospos_sessions`;
|
||||
|
||||
CREATE TABLE `ospos_sessions` (
|
||||
`id` varchar(40) NOT NULL,
|
||||
`ip_address` varchar(45) NOT NULL,
|
||||
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
|
||||
`data` blob NOT NULL,
|
||||
KEY `ci_sessions_timestamp` (`timestamp`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
@@ -676,10 +676,11 @@ CREATE TABLE `ospos_sales_suspended_payments` (
|
||||
--
|
||||
|
||||
CREATE TABLE `ospos_sessions` (
|
||||
`id` varchar(40) NOT NULL DEFAULT '0',
|
||||
`ip_address` varchar(45) NOT NULL DEFAULT '0',
|
||||
`id` varchar(40) NOT NULL,
|
||||
`ip_address` varchar(45) NOT NULL,
|
||||
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
|
||||
`data` blob NOT NULL,
|
||||
`timestamp` int(10) unsigned NOT NULL DEFAULT '0'
|
||||
KEY `ci_sessions_timestamp` (`timestamp`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
|
||||
@@ -676,10 +676,11 @@ CREATE TABLE `ospos_sales_suspended_payments` (
|
||||
--
|
||||
|
||||
CREATE TABLE `ospos_sessions` (
|
||||
`id` varchar(40) NOT NULL DEFAULT '0',
|
||||
`ip_address` varchar(45) NOT NULL DEFAULT '0',
|
||||
`id` varchar(40) NOT NULL,
|
||||
`ip_address` varchar(45) NOT NULL,
|
||||
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
|
||||
`data` blob NOT NULL,
|
||||
`timestamp` int(10) unsigned NOT NULL DEFAULT '0'
|
||||
KEY `ci_sessions_timestamp` (`timestamp`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
|
||||
@@ -676,10 +676,11 @@ CREATE TABLE `ospos_sales_suspended_payments` (
|
||||
--
|
||||
|
||||
CREATE TABLE `ospos_sessions` (
|
||||
`id` varchar(40) NOT NULL DEFAULT '0',
|
||||
`ip_address` varchar(45) NOT NULL DEFAULT '0',
|
||||
`id` varchar(40) NOT NULL,
|
||||
`ip_address` varchar(45) NOT NULL,
|
||||
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
|
||||
`data` blob NOT NULL,
|
||||
`timestamp` int(10) unsigned NOT NULL DEFAULT '0'
|
||||
KEY `ci_sessions_timestamp` (`timestamp`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user