update structure DB

This commit is contained in:
Bernat 2018-06-06 14:28:15 +02:00
parent 5c00931952
commit bde61a8509
2 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,31 @@
CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `buy` AS
SELECT
`c`.`Id_Compra` AS `id`,
`c`.`Id_Entrada` AS `entryFk`,
`c`.`Id_Article` AS `itemFk`,
`c`.`Costefijo` AS `buyingValue`,
`c`.`Cantidad` AS `quantity`,
`c`.`Id_Cubo` AS `packageFk`,
`c`.`Etiquetas` AS `stickers`,
`c`.`Portefijo` AS `freightValue`,
`c`.`Embalajefijo` AS `packageValue`,
`c`.`Comisionfija` AS `comissionValue`,
`c`.`Packing` AS `packing`,
`c`.`grouping` AS `grouping`,
`c`.`caja` AS `groupingMode`,
`c`.`Nicho` AS `location`,
`c`.`Tarifa1` AS `price1`,
`c`.`Tarifa2` AS `price2`,
`c`.`Tarifa3` AS `price3`,
`c`.`PVP` AS `minPrice`,
`c`.`Productor` AS `producer`,
`c`.`Vida` AS `printedStickers`,
`c`.`punteo` AS `isChecked`,
`c`.`buy_edi_id` AS `ektFk`,
`c`.`Novincular` AS `isIgnored`
FROM
`vn2008`.`Compres` `c`

View File

@ -0,0 +1,44 @@
CREATE
ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `edi`.`ekt` AS
SELECT
`vn2008`.`buy_edi`.`id` AS `id`,
`vn2008`.`buy_edi`.`barcode` AS `barcode`,
`vn2008`.`buy_edi`.`entry_year` AS `entry_year`,
`vn2008`.`buy_edi`.`delivery_number` AS `delivery_number`,
`vn2008`.`buy_edi`.`fec` AS `fec`,
`vn2008`.`buy_edi`.`hor` AS `hor`,
`vn2008`.`buy_edi`.`now` AS `now`,
`vn2008`.`buy_edi`.`ptj` AS `ptj`,
`vn2008`.`buy_edi`.`ref` AS `ref`,
`vn2008`.`buy_edi`.`item` AS `item`,
`vn2008`.`buy_edi`.`pac` AS `pac`,
`vn2008`.`buy_edi`.`qty` AS `qty`,
`vn2008`.`buy_edi`.`ori` AS `ori`,
`vn2008`.`buy_edi`.`cat` AS `cat`,
`vn2008`.`buy_edi`.`agj` AS `agj`,
`vn2008`.`buy_edi`.`kop` AS `kop`,
`vn2008`.`buy_edi`.`ptd` AS `ptd`,
`vn2008`.`buy_edi`.`sub` AS `sub`,
`vn2008`.`buy_edi`.`pro` AS `pro`,
`vn2008`.`buy_edi`.`pri` AS `pri`,
`vn2008`.`buy_edi`.`package` AS `package`,
`vn2008`.`buy_edi`.`auction` AS `auction`,
`vn2008`.`buy_edi`.`klo` AS `klo`,
`vn2008`.`buy_edi`.`k01` AS `k01`,
`vn2008`.`buy_edi`.`k02` AS `k02`,
`vn2008`.`buy_edi`.`k03` AS `k03`,
`vn2008`.`buy_edi`.`k04` AS `k04`,
`vn2008`.`buy_edi`.`s1` AS `s1`,
`vn2008`.`buy_edi`.`s2` AS `s2`,
`vn2008`.`buy_edi`.`s3` AS `s3`,
`vn2008`.`buy_edi`.`s4` AS `s4`,
`vn2008`.`buy_edi`.`s5` AS `s5`,
`vn2008`.`buy_edi`.`s6` AS `s6`,
`vn2008`.`buy_edi`.`ok` AS `ok`,
`vn2008`.`buy_edi`.`trolley_id` AS `trolley_id`,
`vn2008`.`buy_edi`.`scanned` AS `scanned`
FROM
`vn2008`.`buy_edi`