salix/db/versions/10852-pinkOak/00-firstScript.sql

30 lines
1.1 KiB
SQL

ALTER TABLE vn.itemShelvingSale DROP COLUMN IF EXISTS isPicked;
ALTER TABLE vn.itemShelvingSale
ADD isPicked TINYINT(1) DEFAULT FALSE NOT NULL;
UPDATE vn.itemShelvingSale SET isPicked = TRUE;
ALTER TABLE vn.productionConfig DROP COLUMN IF EXISTS orderMode;
ALTER TABLE vn.productionConfig
ADD orderMode ENUM('Location', 'Age') NOT NULL DEFAULT 'Location';
ALTER TABLE vn.itemShelving DROP COLUMN IF EXISTS available;
ALTER TABLE vn.itemShelving ADD available INT NULL;
UPDATE vn.itemShelving SET available = visible;
CREATE TABLE vn.itemShelvingSaleReserv (
`id` int(11) NOT NULL AUTO_INCREMENT,
`saleFk` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `itemShelvingSaleReserv_ibfk_1` (`saleFk`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci
COMMENT='Queue of changed itemShelvingSale to reserve';
INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
VALUES
('Collection', 'assignCollection', 'WRITE', 'ALLOW', 'ROLE', 'production');