salix/db/changes/10080-september/00-articles.sql

55 lines
1.8 KiB
SQL

ALTER TABLE `vn2008`.`Articles`
ADD COLUMN `hasKgPrice` TINYINT(1) NOT NULL DEFAULT '0' AFTER `upToDown`;
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`item` AS
SELECT
`t`.`Id_Article` AS `id`,
`t`.`Article` AS `name`,
`t`.`tipo_id` AS `typeFk`,
`t`.`Medida` AS `size`,
`t`.`Color` AS `inkFk`,
`t`.`Categoria` AS `category`,
`t`.`Tallos` AS `stems`,
`t`.`id_origen` AS `originFk`,
`t`.`description` AS `description`,
`t`.`producer_id` AS `producerFk`,
`t`.`Codintrastat` AS `intrastatFk`,
`t`.`offer` AS `isOnOffer`,
`t`.`caja` AS `box`,
`t`.`expenceFk` AS `expenceFk`,
`t`.`bargain` AS `isBargain`,
`t`.`comments` AS `comment`,
`t`.`relevancy` AS `relevancy`,
`t`.`Foto` AS `image`,
`t`.`generic` AS `generic`,
`t`.`density` AS `density`,
`t`.`iva_group_id` AS `taxClassFk`,
`t`.`PVP` AS `minPrice`,
`t`.`Min` AS `hasMinPrice`,
`t`.`isActive` AS `isActive`,
`t`.`longName` AS `longName`,
`t`.`subName` AS `subName`,
`t`.`tag5` AS `tag5`,
`t`.`value5` AS `value5`,
`t`.`tag6` AS `tag6`,
`t`.`value6` AS `value6`,
`t`.`tag7` AS `tag7`,
`t`.`value7` AS `value7`,
`t`.`tag8` AS `tag8`,
`t`.`value8` AS `value8`,
`t`.`tag9` AS `tag9`,
`t`.`value9` AS `value9`,
`t`.`tag10` AS `tag10`,
`t`.`value10` AS `value10`,
`t`.`minimum` AS `minimum`,
`t`.`upToDown` AS `upToDown`,
`t`.`compression` AS `compression`,
`t`.`hasKgPrice` AS `hasKgPrice`
FROM
`vn2008`.`Articles` `t`;