feat: query di installazione

This commit is contained in:
valentina 2024-10-30 11:44:49 +01:00
parent 263d79e0ed
commit d2271df053
1 changed files with 8 additions and 7 deletions

View File

@ -64,21 +64,22 @@ INSERT INTO `zz_views_lang` (`id_lang`, `id_record`, `title`) VALUES
('1', (SELECT `id` FROM `zz_views` WHERE `name` = 'color_Colore' AND `id_module` = @id_module), 'color_Colore'),
('2', (SELECT `id` FROM `zz_views` WHERE `name` = 'color_Colore' AND `id_module` = @id_module), 'color_Color');
-- Mandati SEPA
CREATE TABLE IF NOT EXISTS `co_mandati_sepa` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_banca` int(11) NOT NULL,
`id_mandato` varchar(255) NOT NULL,
`data_firma_mandato` DATE NOT NULL,
`singola_disposizione` TINYINT(1) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_banca`) REFERENCES `co_banche`(`id`) ON DELETE CASCADE
) ENGINE=InnoDB;
ALTER TABLE `co_mandati_sepa` ADD `singola_disposizione` TINYINT(1) NOT NULL AFTER `data_firma_mandato`;
-- Aggiunta del plugin
INSERT INTO `zz_plugins` (`id`, `name`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`) VALUES
(NULL, 'Mandati SEPA', (SELECT `id` FROM `zz_modules` WHERE `name`='Banche'), (SELECT `id` FROM `zz_modules` WHERE `name`='Banche'), 'tab', '', 1, 1, 0, '2.*', '', NULL, 'custom', 'mandati_sepa', '');
SELECT @id_module := `id` FROM `zz_modules` WHERE `name` = 'Banche';
INSERT INTO `zz_plugins` (`name`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`) VALUES
('Mandati SEPA', @id_module, @id_module, 'tab', '', 1, 1, 0, '2.6.*', '', NULL, 'custom', 'mandati_sepa', '');
INSERT INTO `zz_plugins_lang` (`id`, `id_lang`, `id_record`, `title`) VALUES
(NULL, 1, (SELECT `id` FROM `zz_plugins` WHERE `name`='Mandati SEPA'), 'Mandati SEPA');
INSERT INTO `zz_plugins_lang` (`id_lang`, `id_record`, `title`)
VALUES
(1, LAST_INSERT_ID(), 'Mandati SEPA'),
(2, LAST_INSERT_ID(), 'Mandati SEPA');