735 lines
28 KiB
SQL
735 lines
28 KiB
SQL
-- Extract modified tables from fixtures:
|
|
-- awk 'match($0, /INSERT INTO `(\w+)`\.`(\w+)`/, ary) {print ary[1]" - "ary[2]}' dump/fixtures.sql | sort -u
|
|
|
|
CALL `cache`.`last_buy_refresh`(FALSE);
|
|
|
|
SET foreign_key_checks = 0;
|
|
|
|
-- XXX: vn-database
|
|
|
|
INSERT INTO util.config (environment, mockTime, mockUtcTime, mockEnabled)
|
|
VALUES ('local', '2001-01-01 12:00:00', '2001-01-01 11:00:00', TRUE);
|
|
/* #5483
|
|
INSERT INTO vn.entryConfig (defaultEntry, mailToNotify, inventorySupplierFk, maxLockTime, defaultSupplierFk)
|
|
VALUES(1, NULL, 1, 300, 1);
|
|
*/
|
|
-- XXX: eti
|
|
|
|
INSERT INTO vn.travel (id,shipped,landed,warehouseInFk,warehouseOutFk,`ref`,m3,kg,cargoSupplierFk)
|
|
VALUES (9,'2022-05-20','2022-05-20',13,4,'nine travel',69.0,600,1);
|
|
/* #5483
|
|
INSERT INTO vn.entry (id, supplierFk, dated, invoiceNumber, evaNotes, travelFk, companyFk)
|
|
VALUES
|
|
(9, 1, '0000-00-00 00:00:00', 'Movement 9', 'observation nine', 8, 442),
|
|
(10, 1, '0000-00-00 00:00:00', 'Movement 10', 'observation ten', 9, 442);
|
|
|
|
INSERT INTO vn.buy (id,entryFk,itemFk,quantity,dispatched,buyingValue,freightValue,isIgnored,stickers,packing,`grouping`,groupingMode,comissionValue,packageValue,packagingFk,price1,price2,price3,minPrice,printedStickers,workerFk,isChecked,isPickedOff,created,`__cm2`,weight)
|
|
VALUES
|
|
(16,10,1,100,0,50.0,1.5,0,1,1,1,0,0.0,1.5,'4',0.0,99.6,99.4,0.0,0,0,1,0,'2022-06-20 00:00:00',0,1.0),
|
|
(17,10,2,450,0,5.0,1.0,0,1,10,10,0,0.0,1.0,'3',0.0,7.3,7.0,0.0,0,0,1,0,'2022-06-20 00:00:00',0,2.5),
|
|
(18,10,15,500,0,55.0,1.0,0,1,1,1,0,0.0,1.0,'5',0.0,78.3,75.6,0.0,0,0,1,0,'2022-06-20 00:00:00',0,2.5),
|
|
(19,10,11,5000,0,50.0,1.0,0,1,1,1,1,0.0,1.0,'4',0.0,99.6,99.4,0.0,0,0,1,0,'2022-06-20 00:00:00',0,2.5);
|
|
*/
|
|
INSERT INTO vn.split (id,ticketFk,entryFk,dated,note)
|
|
VALUES
|
|
(1,7,2,'00-00-0000 00:00:00.000','nota1'),
|
|
(2,10,6,'00-00-0000 00:00:00.000','nota2'),
|
|
(3,15,7,'00-00-0000 00:00:00.000','nota3'),
|
|
(4,22,10,'00-00-0000 00:00:00.000','nota4');
|
|
|
|
-- XXX: enc
|
|
|
|
INSERT INTO vn.mdbVersion (app, branchFk, version)
|
|
VALUES('enc', 'master', 1);
|
|
|
|
UPDATE vn.warehouse
|
|
SET isForTicket = 1, addressFk = 118
|
|
WHERE id = 1;
|
|
|
|
UPDATE vn.packaging
|
|
SET freightItemFk = 1, isBox = 1
|
|
WHERE id = '94';
|
|
/* #5483
|
|
INSERT INTO `vn`.`packagingConfig`(`upperGap`, `defaultSmallPackageFk`, `defaultBigPackageFk`)
|
|
VALUES
|
|
('10', 1, 2);
|
|
*/
|
|
UPDATE vn.packaging SET freightItemFk=1 WHERE id='1';
|
|
UPDATE vn.packaging SET freightItemFk=1 WHERE id='2';
|
|
|
|
INSERT INTO vn.packagingWithFreight (packagingFk, priority) VALUES('1', 1);
|
|
|
|
INSERT INTO vn.cmrConfig (dayOfMonth, landingDays)
|
|
VALUES(5, 1);
|
|
|
|
UPDATE vn.supplier
|
|
SET isTrucker = 1
|
|
WHERE id = 2;
|
|
|
|
-- XXX: tpv
|
|
|
|
UPDATE `vn`.`claimRatio` SET `claimAmount` = '10' WHERE (`clientFk` = '1101');
|
|
|
|
INSERT INTO `vn`.`agency` (`name`, `warehouseFk`, `isOwn`, `isAnyVolumeAllowed`)
|
|
VALUES
|
|
('Agencia', '1', '1', '1'),
|
|
('Otra agencia ', '1', '0', '0');
|
|
|
|
INSERT INTO `vn`.`expedition` (`agencyModeFk`, `ticketFk`, `isBox`, `counter`, `workerFk`, `externalId`, `packagingFk`, `hostFk`, `itemPackingTypeFk`, `hasNewRoute`) VALUES
|
|
('1', '1', 1, '1', '1', '1', '1', 'pc00', 'F', 0),
|
|
('1', '1', 1, '2', '1', '1', '1', 'pc00', 'F', 0);
|
|
|
|
INSERT INTO vn.client (id,name,defaultAddressFk,street,fi,email,dueDay,isTaxDataChecked,accountingAccount,city,provinceFk,postcode,socialName,contact,credit,countryFk,quality,riskCalculated) VALUES
|
|
(100,'root',110,'Valle de la muerte','74974747G','root@mydomain.com',0,1,'4300000078','ALGEMESI',1,'46680','rootSocial','rootContact',500.0,1,10,'2025-01-01');
|
|
|
|
INSERT INTO vn.address (clientFk,street,city,provinceFk,postalCode,nickname,isEqualizated,isLogifloraAllowed,isDefaultAddress) VALUES
|
|
(100,'rootStreet','ALGEMESI',3,'46680','root',0,0,1);
|
|
/* #5483
|
|
INSERT INTO vn.ticket (clientFk,warehouseFk,shipped,nickname,refFk,addressFk,routeFk,companyFk,agencyModeFk,landed,zoneFk, totalWithVat, totalWithoutVat) VALUES
|
|
(100,1,'2025-07-06 00:00:00','Saco de patatas',NULL,103,6,442,1,'2025-07-06',13, 500, 450),
|
|
(100,1,'2021-07-06 00:00:00','Alubias de la abuelita Enrriqueta','T4444444',103,6,442,1,'2021-07-06',13, 1000, 900);
|
|
*/
|
|
INSERT INTO vn.receipt (invoiceFk,amountPaid,payed,workerFk,bankFk,clientFk,isConciliate,companyFk) VALUES
|
|
('Cobro mental',999.0,'2021-06-21 00:00:00',9,3,100,1,442),
|
|
('Cobro web',50.0,'2022-06-21 00:00:00',9,3,100,1,567);
|
|
|
|
INSERT INTO vn.workerBosses (workerFk,bossFk) VALUES
|
|
(44,100),
|
|
(70,100),
|
|
(47,100),
|
|
(58,100),
|
|
(1106,100);
|
|
|
|
UPDATE vn.agencyMode
|
|
SET deliveryMethodFk=1
|
|
WHERE id=1;
|
|
|
|
UPDATE vn.agencyMode
|
|
SET deliveryMethodFk=2
|
|
WHERE id=2;
|
|
/* #5483
|
|
INSERT INTO vn.ticket (clientFk, warehouseFk, shipped, nickname, refFk, addressFk, workerFk, observations, isSigned, isLabeled, isPrinted, packages, location, `hour`, created, isBlocked, solution, routeFk, priority, hasPriority, companyFk, agencyModeFk, landed, isBoxed, isDeleted, zoneFk, zonePrice, zoneBonus, totalWithVat, totalWithoutVat, weight) VALUES
|
|
(100, 3, '2022-07-12 00:00:00', 'root', NULL, 195, NULL, NULL, 0, 0, 0, 0, NULL, 0, '2022-07-12 16:18:58', 1, NULL, 3, NULL, 1, 567, 1, '2022-07-12', 0, 0, 5, NULL, NULL, NULL, NULL, NULL),
|
|
(100, 4, '2022-07-12 00:00:00', 'root', NULL, 195, NULL, NULL, 0, 0, 0, 0, NULL, 0, '2022-07-12 16:18:58', 1, NULL, 4, NULL, 1, 567, 1, '2022-07-12', 0, 0, 6, NULL, NULL, NULL, NULL, NULL),
|
|
(100, 5, '2022-07-12 00:00:00', 'root', NULL, 195, NULL, NULL, 0, 0, 0, 0, NULL, 0, '2022-07-12 16:18:58', 1, NULL, 5, NULL, 1, 567, 1, '2022-07-12', 0, 0, 1, NULL, NULL, NULL, NULL, NULL);
|
|
*/
|
|
INSERT INTO vn.sector (description,warehouseFk) VALUES
|
|
('Sector One',1);
|
|
|
|
INSERT INTO vn.saleGroup (userFk,parkingFk,sectorFk) VALUES
|
|
(100,1,1);
|
|
|
|
INSERT INTO vn.saleGroupDetail (saleFk,saleGroupFk) VALUES
|
|
(32,1);
|
|
/* #5483
|
|
INSERT INTO vn.itemShelving (id,itemFk,visible,shelvingFk,`grouping`,packing,packagingFk,userFk) VALUES
|
|
(4,1,5,'HEJ',12,12,'2',100);
|
|
*/
|
|
INSERT INTO vn.beach (code,warehouseFk) VALUES
|
|
('TEST',1);
|
|
|
|
INSERT INTO vn.routesMonitor (routeFk,name,beachFk,m3,expeditionTruckFk) VALUES
|
|
(1,'TEST','TEST',1.0,1);
|
|
/* #5483
|
|
INSERT INTO vn.ticket (clientFk, warehouseFk, shipped, nickname, refFk, addressFk, workerFk, observations, isSigned, isLabeled, isPrinted, packages, location, `hour`, created, isBlocked, solution, routeFk, priority, hasPriority, companyFk, agencyModeFk, landed, isBoxed, isDeleted, zoneFk, zonePrice, zoneBonus, totalWithVat, totalWithoutVat, weight)
|
|
VALUES (1101, 1, '2022-07-19 10:00:00', 'Bruce Wayne', NULL, 1, NULL, NULL, 0, 0, 0, 0, NULL, 0, '2022-07-19 08:14:37', 1, NULL, 1, 1, 1, 442, 1, '2022-07-06', 0, 0, 13, 5.00, 1.00, 80.00, 75.00, NULL);
|
|
|
|
INSERT INTO vn.sale (itemFk, ticketFk, concept, quantity, originalQuantity, price, discount, priceFixed, reserved, isPicked, isPriceFixed, created, isAdded)
|
|
VALUES (1, 24, 'Ranged weapon longbow 2m', 1.00, NULL, 8.07, 0, 0.00, 0, 0, 0, '2022-07-06 00:00:00', 0);
|
|
*/
|
|
INSERT INTO vn2008.zones (zone_id,name,printingOrder)
|
|
VALUES (1,'zone Test',1);
|
|
|
|
-- XXX: lab
|
|
|
|
INSERT INTO `vn`.`businessReasonEnd` (`id`, `reason`)
|
|
VALUES
|
|
('1', 'Baja voluntaria'),
|
|
('2', 'No supera PP empresa'),
|
|
('3', 'Despido');
|
|
|
|
INSERT INTO `vn2008`.`payroll_categorias` (`codcategoria`, `descripcion`, `Tarifa`)
|
|
VALUES
|
|
('11', 'INFORMATICA', '2'),
|
|
('12', 'AUX INFORMATICA', '7');
|
|
|
|
INSERT INTO `vn`.`occupationCode` (`code`, `name`)
|
|
VALUES
|
|
('a', 'Personal en trabajaos exclusivos de oficina'),
|
|
('b', 'Representantes de comercio'),
|
|
('c', 'Personal de oficios en trabajos de construcción en general, y en instalac.,edificios y obras');
|
|
|
|
INSERT INTO `vn2008`.`payroll_employee` (`CodTrabajador`,`nss`,`codpuesto`,`codempresa`,`codcontrato`,`FAntiguedad`,`grupotarifa`,`codcategoria`,`ContratoTemporal`)
|
|
VALUES
|
|
(36,'46/10515497-58',6,20,189,'2009-01-02',5,10,0),
|
|
(43,'46/10235353-50',7,20,189,'2009-04-21',5,10,0),
|
|
(76,'46/10250562-30',1,20,189,'2009-09-07',9,5,0),
|
|
(1106,'46/10297768-94',4,20,100,'2021-03-09',7,18,0),
|
|
(1107,'46/1627085-11',15,20,402,'2021-03-15',9,6,1),
|
|
(1108,'46/10446901-41',25,20,502,'2021-03-22',10,29,1),
|
|
(1109,'46/10552113-8',3,20,402,'2021-03-23',9,9,1),
|
|
(1110,'46/10723579-75',3,20,402,'2021-03-23',9,9,1);
|
|
|
|
INSERT INTO `vn`.`trainingCourseType` (`id`, `name`)
|
|
VALUES
|
|
('1', 'Curso 1'),
|
|
('2', 'Curso 2');
|
|
|
|
INSERT INTO `vn`.`trainingCenter` (`id`, `name`)
|
|
VALUES
|
|
('1', 'Centro curso 1'),
|
|
('2', 'Centro Curso 2');
|
|
|
|
INSERT INTO `vn`.`medicalCenter` (`id`, `name`)
|
|
VALUES
|
|
('1', 'Centro médico 1'),
|
|
('2', 'Centro médico 2');
|
|
|
|
INSERT INTO `vn`.`disabilityGrade` (`id`, `description`)
|
|
VALUES
|
|
('1', 'Grado 1'),
|
|
('2', 'Grado 2');
|
|
|
|
INSERT INTO `vn`.`absenceType` (`id`,`name`,`rgb`,`color`,`permissionRate`,`code`,`isAllowedToWork`,`isPrintable`,`discountRate`,`holidayEntitlementRate`)
|
|
VALUES
|
|
(7,'Excedencia','#C71585',16711935,0.00,'leave',0,0,1.00,1.00),
|
|
(10,'Baja mutua','#00ffff',16776960,1.00,'insurance',0,0,1.00,0.00),
|
|
(11,'Permiso retribuido','#0080ff',16744448,1.00,NULL,0,1,1.00,0.00),
|
|
(12,'Visita médico','#ff80ff',16744703,1.00,NULL,0,0,1.00,0.00),
|
|
(13,'Visita mutua','#808040',4227200,0.00,NULL,0,0,1.00,0.00),
|
|
(14,'Maternidad/Paternidad','#008040',4227072,1.00,'maternity',0,1,1.00,0.00),
|
|
(16,'Visita comercial','#00ff00',65280,1.00,NULL,0,1,1.00,0.00),
|
|
(17,'Compensar','#dbec40',4844763,0.00,NULL,0,1,1.00,0.00),
|
|
(18,'Parte','#0af5a0',10747402,1.00,'proof',0,0,1.00,0.00),
|
|
(19,'Descanso','#664208',4798193,0.00,NULL,0,0,1.00,0.00),
|
|
(22,'Sin justificar','#8B3E2F',3096203,1.00,NULL,1,1,1.00,0.00);
|
|
|
|
-- XXX: app
|
|
|
|
INSERT INTO vn.deviceProductionModels (code)
|
|
VALUES('TC210K');
|
|
|
|
INSERT INTO vn.deviceProduction (id, imei, modelFk, macWifi, serialNumber, android_id, purchased)
|
|
VALUES(100, NULL, 'TC210K', '78B8D67298A6', '21114523025303', NULL, '1900-01-01');
|
|
|
|
INSERT INTO vn.deviceProductionUser (deviceProductionFk, userFk, created)
|
|
VALUES(100, 9, NULL);
|
|
|
|
INSERT INTO vn.expeditionStateType (id, description, code)
|
|
VALUES(15, 'Perdida', 'LOST');
|
|
|
|
INSERT INTO vn.expedition (agencyModeFk,ticketFk,isBox,counter,hostFk,hasNewRoute)
|
|
VALUES (1,21,1,1,'',0);
|
|
/* #5483
|
|
INSERT INTO vn.sectorCollection (id, created, userFk, sectorFk)
|
|
VALUES(18, '2022-07-29 09:03:31', 9, 1);
|
|
*/
|
|
INSERT INTO vn.saleGroup (id, created, userFk, parkingFk, sectorFk)
|
|
VALUES(3, '2022-07-29 07:18:49', 9, NULL, 1);
|
|
|
|
INSERT INTO vn.sectorCollectionSaleGroup (id, created, sectorCollectionFk, saleGroupFk)
|
|
VALUES(7, '2022-07-29 09:05:37', 18, 3);
|
|
|
|
INSERT INTO vn.saleGroupDetail (created, saleFk, saleGroupFk)
|
|
VALUES
|
|
( '2022-07-29 07:26:44', 14, 3),
|
|
( '2022-07-29 07:26:44', 15, 3);
|
|
|
|
INSERT INTO vn.saleTracking (saleFk, isChecked, created, originalQuantity, workerFk, id, stateFk)
|
|
VALUES
|
|
(15, 1, '2022-07-29 07:56:16', 10.0, 9, 6, 26);
|
|
/* #5483
|
|
INSERT INTO vn.ticket (id, clientFk, warehouseFk, shipped, nickname, refFk, addressFk, workerFk, observations, isSigned, isLabeled, isPrinted, packages, location, `hour`, created, isBlocked, solution, routeFk, priority, hasPriority, companyFk, agencyModeFk, landed, isBoxed, isDeleted, zoneFk, zonePrice, zoneBonus, totalWithVat, totalWithoutVat, weight)
|
|
VALUES
|
|
(3000001, 1110, 1, '2022-07-28 21:00:00', 'ATELIER ART FLORAL', NULL, 129, NULL, NULL, 0, 0, 0, 1, NULL, 0, '2022-07-28 20:27:14', 1, NULL, 1, 16, 1, 442, 1, '2022-07-29', 0, 0, 1, 4.00, 0.00, 41.68, 37.42, NULL);
|
|
|
|
INSERT INTO vn.collection (id, created, workerFk, stateFk, itemPackingTypeFk, saleTotalCount, salePickedCount, trainFk)
|
|
VALUES
|
|
(600001, '2022-07-28 20:04:24', 9, 5, NULL, 5, 5, 1);
|
|
|
|
INSERT INTO vn.sale (itemFk, ticketFk, concept, quantity, originalQuantity, price, discount, priceFixed, reserved, isPicked, isPriceFixed, created, isAdded)
|
|
VALUES
|
|
( 1, 3000001, 'Ranged weapon longbow 2m', 5.00, NULL, 100.39, 0, 0.00, 0, 1, 0, '2022-06-13 00:00:00', 0);
|
|
*/
|
|
INSERT INTO vn.collectionColors(code, shelve, wagon, trainFk)
|
|
VALUES
|
|
( 'ROJO', 1, 1, 1);
|
|
|
|
INSERT INTO vn.ticketCollection (ticketFk, collectionFk, created, `level`, wagon, smartTagFk, usedShelves, itemCount, liters)
|
|
VALUES
|
|
(3000001, 600001, '2022-07-28 20:04:24', 1, 1, NULL, NULL, 6, 122);
|
|
/* #5483
|
|
INSERT INTO vn.itemShelving (itemFk, shelvingFk, visible, created, `grouping`, packing, packagingFk, userFk, buyFk)
|
|
VALUES
|
|
( 1, 'HEJ', 4, '2022-07-13 10:33:34', 12, 12, NULL, 9 , 1),
|
|
( 1, 'GVC', 10, '2022-07-13 10:33:34', 12, 12, NULL, 100, 2),
|
|
( 1, 'UXN', 20, '2022-07-13 10:33:34', 12, 12, NULL, 100, 3);
|
|
|
|
INSERT INTO vn.operator (workerFk, numberOfWagons, trainFk, itemPackingTypeFk, warehouseFk)
|
|
VALUES
|
|
(9, 1, 1, 'V', 1);
|
|
*/
|
|
-- XXX: web
|
|
/* #5483
|
|
INSERT INTO `hedera`.`config` (`cookieLife`, `defaultForm`)
|
|
VALUES (15,'cms/home');
|
|
|
|
INSERT INTO `hedera`.`imageConfig` (`maxSize`, `url`)
|
|
VALUES (20, '//cdn.verdnatura.es/image');
|
|
|
|
INSERT INTO `hedera`.`orderConfig` (`employeeFk`, `guestMethod`, `guestAgencyFk`, `defaultCompanyFk`)
|
|
VALUES (1, 'PICKUP', 1, 442);
|
|
|
|
INSERT INTO `hedera`.`news` (`title`,`text`, `image`, `userFk`, `created`, `priority`, `tag`)
|
|
VALUES
|
|
('Foo new', 'Hi, welcome to Verdnatura''s webshop', 'sd', 9, '2022-01-01 00:00:00', 1, 'new'),
|
|
('Bar new', 'Here you can buy any plant you want', 'sd', 9, '2022-01-02 00:00:00', 1, 'new');
|
|
|
|
UPDATE `vn`.`agencyMode` SET `description` = `name`;
|
|
|
|
INSERT INTO `hedera`.`tpvConfig` (currency, terminal, transactionType, maxAmount, employeeFk, `url`, testMode, testUrl, testKey, merchantUrl)
|
|
VALUES (978, 1, 0, 2000, 9, 'https://sis.redsys.es/sis/realizarPago', 0, 'https://sis-t.redsys.es:25443/sis/realizarPago', 'sq7HjrUOBfKmC576ILgskD5srU870gJ7', NULL);
|
|
*/
|
|
INSERT INTO hedera.tpvMerchantEnable (merchantFk, companyFk)
|
|
VALUES (1, 442);
|
|
-- XXX: floranet
|
|
|
|
INSERT INTO vn.intrastat(id, description, taxClassFk, taxCodeFk)
|
|
VALUES(6031970, 'Flores y capullos frescos (Otras: ramos, coronas)', 1, 63);
|
|
|
|
-- Generación de items
|
|
SELECT id
|
|
INTO @FNR
|
|
FROM vn.itemType
|
|
WHERE code = 'FNR';
|
|
|
|
SELECT id
|
|
INTO @FNP
|
|
FROM vn.itemType
|
|
WHERE code = 'FNP';
|
|
|
|
DELETE
|
|
FROM vn.item
|
|
WHERE typeFk IN (@FNR,@FNP);
|
|
|
|
SELECT MAX(id) + 1
|
|
INTO @item
|
|
FROM vn.item;
|
|
|
|
INSERT INTO vn.item
|
|
(
|
|
id,
|
|
name,
|
|
longName,
|
|
`size`,
|
|
originFk,
|
|
intrastatFk,
|
|
typeFk,
|
|
inkFk,
|
|
image,
|
|
description
|
|
)
|
|
VALUES
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Terranova',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin ORDER BY RAND() LIMIT 1),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1CwtEK5_GReAzconaJsPTCXxV7zajbTos/view?usp=drive_link',
|
|
CONCAT('Hemos elegido una selección de flores muy especiales para realizar ',
|
|
'esta composición: brásicas, flor de cera, astrantia, espigas, lisiantum, ',
|
|
'paniculata eucaliptus.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Tasmania',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1_149uYZ-sehw3vWH68Quttk8QJe5T_bG/view?usp=drive_link',
|
|
CONCAT('La elegancia de este ramo es por la elección de todas las flores que lo componen: ',
|
|
'eringium, verdes variados, rosas proteas, margaritas, astrantia, esta selección de ',
|
|
'flores será un acierto seguro para hacer un regalo muy especial.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Pasion',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1-dH1UilV-nOH9XNK23uooZoezlwMT-Jq/view?usp=drive_link',
|
|
CONCAT('La unión de las rosas rojas con el lilium rosa hace de este ramo uno de ',
|
|
'los más especiales , el juego de las dos tonalidades con los diferentes verdes ',
|
|
'que cuidadosamente selecionamos para darle el toque final a la composicion hace ',
|
|
'que este ramo sea al mismo tiempo elegante y atrevido, para amantes de lo inesperado ',
|
|
'que quieren decorar alguna estancia de su hogar o hacer un ragalo muy especial')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Florencia',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1PWKo5N8kg8H3xQtELdeQTQIc1HMZCc1P/view?usp=drive_link',
|
|
CONCAT('Este ramo evoca los colores del atardecer en Florencia, las rosas ramificadas ',
|
|
'de pitimini con diferentes tonalidades y la paniculata nos transpotan al ambiente ',
|
|
'sofisticado del norte de Italia y la frescura de los verdes variados nos recuerda ',
|
|
'a la campiña italiana .Este ramo es ideal para regalar pensando en alguien muy especial.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Atardecer',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink WHERE name = 'Yellow'),
|
|
'https://drive.google.com/file/d/1eM4gtftQuXN5xUjAHIRUYNPZNmuHVRA_/view?usp=drive_link',
|
|
CONCAT('Las rosas amarillas simbolizan la alegría de vivir, la calidez ,el ',
|
|
'optimismo y la energía, por eso son el regalo perfecto para una ocasión muy ',
|
|
'especial o para celebrar la alegría de una amistad o de un encuentro, a estas ',
|
|
'preciosas rosas les añadimos un toque desenfadado a través de los verdes ',
|
|
'variados que unidos a la belleza de la rosa que seguro serán una apuesta segura.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Arcoíris',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1Hxk5yqo7891gfK1VKIYfWxO5a_0K2Qej/view?usp=drive_link',
|
|
CONCAT('Llega la primavera a tu casa con el ramo Arco Iris , conseguirás iluminar ',
|
|
'cualquier estancia gracias a la combinacón de las gerberas holandesas de gran ',
|
|
'tamaño con colores muy vivos que a su vez contrastan a la perfección con las ',
|
|
'margaritas coconut y el estatice variado, todo ello acompañado de verdes entre ',
|
|
'los que destaca el ruscus danae , para dulcificar la explosión de color , ',
|
|
'añadimos paniculata , una flor sencilla pero que aporta gran armonía al ramo')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Provenza',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1TA9SBwjqnrEqG1bzwDL37sxtX9CNyLJk/view?usp=drive_link',
|
|
CONCAT('La delicada composición de este ramo escogida de forma minuciosa hecho ',
|
|
'con liliums rosa, lisiantum blanco y rosas de color rosa todo ello unificado ',
|
|
'con una selección de maravillosos verdes variados, hacen que esta combinación ',
|
|
'sea muy especial para decorar cualquier estancia de tu casa a la que aportará una luz especial.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Alegria',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1sOf2isj84P9OxR3E3x6n2PjPnWVamLCE/view?usp=drive_link',
|
|
CONCAT('Hemos elegido el nombre de Alegría para este ramo ya que sus intensos ',
|
|
'y variados colores nos producen esa sensación, la combinación de rosas blancas ',
|
|
', alstroemeria rosa unida a la paniculata tambien de color rosa y a la sutileza ',
|
|
'de la combinación de verdes variados, hace de este ramo una opción perfecta de ',
|
|
'regalo que a todo el mundo le gusta por su armoniosa combinacion de colores.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Planta Orquídeas ',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNP,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/14BIkDDonFaIiTyJer1CWju1YzZNzt3XQ/view?usp=drive_link',
|
|
CONCAT('Elegimos personalmente en nuestra tienda dos plantas de orquídeas ',
|
|
'con las mejores características combinadas con diferentes elementos de ',
|
|
'decoración consiguiendo una composición ideal para cualquier ambiente.El ',
|
|
'recipiente de cerámica se puede utilizar para múltiples funciones y sacar ',
|
|
'de el las dos plantas de orquídeas para colocarlas en dos puntos diferentes ',
|
|
'de nuestro hogar, ya que se respeta siempre las macetas originales de cada orquídea')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Planta Kentia',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNP,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1rKe2RicfWha-VIm1LbbXckbA41glA99K/view?usp=drive_link',
|
|
CONCAT('La Kentia es una de las plantas más decorativas debido al porte que ',
|
|
'le otorgan sus largas finas hojas arqueadas, ideal para un regalo que dejará ',
|
|
'sin palabras a quien lo reciba o para decorar una estancia de tu hogar, ',
|
|
'desde un espacio super moderno hasta el ambiente más clásico. Nuestras Kentias ',
|
|
'proceden de uno de los mejores productores de kentias del mundo, con el añadido ',
|
|
'de ser un producto nacional producido en Canarias de una calidad extrema.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Planta Calathea',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNP,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/11CKm5rqVFVPOELciuyXUrkc2oeTHJzBE/view?usp=drive_link',
|
|
CONCAT('Esta planta originaria de América tropical, principalmente de Brasil y Perú ',
|
|
', son plantas ideales para embellecer el interior de una estancia . Debido a su ',
|
|
'llamativo y original colorido, tambien es un regalo perfecto para ',
|
|
'cualquier compromiso que tengamos .')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Planta Anthurium ',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNP,
|
|
(SELECT id FROM vn.ink WHERE name = 'Red'),
|
|
'https://drive.google.com/file/d/1j4il_N9VJGaP4f6CPZM0u6GjxwIeYcBt/view?usp=drive_link',
|
|
CONCAT('Nos encanta el color rojo de sus flores .Esta planta original de ',
|
|
'Costa Rica ,proviene de las zonas tropicales de America Central y del Sur, ',
|
|
'su llamativo color alegrará cualquier celebración')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Mindanao',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1lsGDuC6xmv3SyGukfLTVYsQvbGf1Bzxy/view?usp=drive_link',
|
|
CONCAT('La combinación de rosas ramificadas amarillas, las hortensias blancas, ',
|
|
'el estatice, el limonium Tanacetum y los verdes variados hace de este ramo uno ',
|
|
'de los que más gustan tanto si es para regalar como para decorar un rincón de tu casa.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Guinea',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1MtF0oghv-ahogaAaVpJNzDiIfyeCCmAi/view?usp=drive_link',
|
|
CONCAT('Hemos elegido una selección de flores muy especiales para realizar esta composición:',
|
|
' brásicas, flor de cera, astrantia, espigas, lisiantum, paniculata eucaliptus.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Eterno',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/1AOMqlZAKqImnnWSmeq1DW1Krj78mACCG/view?usp=drive_link',
|
|
CONCAT('La perfecta combinación de los diferentes tonos de estatice y el eucaliptus ',
|
|
'cinerea hacen de este ramo un recuerdo inolvidable ya que ambos materiales son de ',
|
|
'larga duración por lo que podrás conservar tu ramo junto con las bonitas vivencias ',
|
|
'de ese día durante mucho tiempo, además le añadimos un toque especial que le dan ',
|
|
'las raices las cuales combinan con los tonos del ramo, unas bonitas cintas del colores ',
|
|
'rematan el acabado del ramo. Este ramo se puede secar y mantenerse en perfecto estado.')
|
|
),
|
|
(
|
|
@item := @item + 1,
|
|
@r := 'Ramo Cielo',
|
|
@r,
|
|
20 + CEIL(RAND() * 55),
|
|
(SELECT id FROM vn.origin WHERE code = 'SPA'),
|
|
6031970,
|
|
@FNR,
|
|
(SELECT id FROM vn.ink ORDER BY RAND() LIMIT 1),
|
|
'https://drive.google.com/file/d/168DikIOwVT5OO4BHARBoWwLB1wjpAS7s/view?usp=drive_link',
|
|
CONCAT('Las hortensias son unas de las flores más elegantes que existen y ',
|
|
'la combinación que proponemos para este ramo te resultará de lo más armoniosa ',
|
|
', ya que intercalamos flores de mayor tamaño como las hortensias azules y ',
|
|
'blancas junto con flores más pequeñas y delicadas como el estatice , todo ello',
|
|
' combinado con el eucaliptus cinerea que te aportará un sueve aroma en toda ',
|
|
'la estancia, el atado del ramo es de rafia natural, siguiendo la tonalidad ',
|
|
'clara de todo el conjunto. ')
|
|
);
|
|
|
|
-- Ramo Terranova: 1er elemento
|
|
INSERT INTO vn.item(
|
|
name,
|
|
longName,
|
|
`size`,
|
|
stems,
|
|
inkFk,
|
|
intrastatFk,
|
|
typeFk,
|
|
originFk)
|
|
SELECT
|
|
@r:= 'Rosa roja',
|
|
@r,
|
|
60,
|
|
1,
|
|
'RED',
|
|
6031970,
|
|
id,
|
|
1
|
|
FROM vn.itemType
|
|
WHERE code LIKE 'FNE';
|
|
|
|
SELECT LAST_INSERT_ID() INTO @itemFk;
|
|
|
|
INSERT INTO floranet.`element`
|
|
SET itemFk = @itemFk;
|
|
|
|
INSERT INTO floranet.builder(
|
|
itemFk,
|
|
elementFk,
|
|
quantity)
|
|
SELECT
|
|
id,
|
|
@itemFk,
|
|
12
|
|
FROM vn.item
|
|
WHERE name = 'Ramo Terranova';
|
|
|
|
-- Ramo Terranova: 2º elemento
|
|
|
|
INSERT INTO vn.item(
|
|
name,
|
|
longName,
|
|
`size`,
|
|
stems,
|
|
inkFk,
|
|
intrastatFk,
|
|
typeFk,
|
|
originFk)
|
|
SELECT
|
|
@r:= 'Hoja de helecho',
|
|
@r,
|
|
60,
|
|
1,
|
|
'BAS',
|
|
6031970,
|
|
id,
|
|
1
|
|
FROM vn.itemType
|
|
WHERE code LIKE 'FNE';
|
|
|
|
SELECT LAST_INSERT_ID() INTO @itemFk;
|
|
|
|
INSERT INTO floranet.`element`
|
|
SET itemFk = @itemFk;
|
|
|
|
INSERT INTO floranet.builder(
|
|
itemFk,
|
|
elementFk,
|
|
quantity)
|
|
SELECT
|
|
id,
|
|
@itemFk,
|
|
4
|
|
FROM vn.item
|
|
WHERE name = 'Ramo Terranova';
|
|
|
|
|
|
-- Ramo Terranova: 3er elemento
|
|
INSERT INTO vn.item(
|
|
name,
|
|
longName,
|
|
`size`,
|
|
stems,
|
|
inkFk,
|
|
intrastatFk,
|
|
typeFk,
|
|
originFk)
|
|
SELECT
|
|
@r:= 'Paniculata',
|
|
@r,
|
|
60,
|
|
1,
|
|
'SLV',
|
|
6031970,
|
|
id,
|
|
1
|
|
FROM vn.itemType
|
|
WHERE code LIKE 'FNE';
|
|
|
|
SELECT LAST_INSERT_ID() INTO @itemFk;
|
|
|
|
INSERT INTO floranet.`element`
|
|
SET itemFk = @itemFk;
|
|
|
|
INSERT INTO floranet.builder(
|
|
itemFk,
|
|
elementFk,
|
|
quantity)
|
|
SELECT
|
|
id,
|
|
@itemFk,
|
|
5
|
|
FROM vn.item
|
|
WHERE name = 'Ramo Terranova';
|
|
|
|
|
|
|
|
-- XXX
|
|
|
|
SET foreign_key_checks = 1;
|
|
|
|
INSERT INTO `account`.`userConfig` (`id`, `loginKey`)
|
|
VALUES (1, 'loginKey');
|
|
|
|
UPDATE `account`.`roleConfig`
|
|
SET `mysqlPassword` = TO_BASE64('nightmare');
|
|
|
|
CREATE USER 'any'@'%' IDENTIFIED BY 'nightmare';
|
|
UPDATE `mysql`.`global_priv` SET `Host` = ''
|
|
WHERE `User` = 'any' AND `Host` = '%';
|
|
|
|
USE account;
|
|
|
|
CALL role_sync;
|
|
|
|
SELECT rolePrefix INTO @rolePrefix FROM roleConfig;
|
|
|
|
SET @genRoleHost = '%';
|
|
SET @prefixLen = CHAR_LENGTH(@rolePrefix);
|
|
SET @prefixedLike = CONCAT(@rolePrefix, '%');
|
|
|
|
INSERT INTO mysql.global_priv (`User`, `Host`, `Priv`)
|
|
SELECT SUBSTR(`User`, @prefixLen + 1), `Host`, `Priv`
|
|
FROM mysql.global_priv
|
|
WHERE `User` LIKE @prefixedLike AND `Host` = @genRoleHost;
|
|
|
|
INSERT INTO mysql.roles_mapping (`User`, `Host`, `Role`, `Admin_option`)
|
|
SELECT SUBSTR(`User`, @prefixLen + 1), `Host`, `Role`, `Admin_option`
|
|
FROM mysql.roles_mapping
|
|
WHERE `User` LIKE @prefixedLike AND `Host` = @genRoleHost;
|
|
|
|
FLUSH PRIVILEGES;
|