fix: only edit structure
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2022-12-13 13:37:25 +01:00
parent 8900656b14
commit 1e0b0028f2
4 changed files with 3 additions and 41 deletions

View File

@ -1,36 +0,0 @@
CREATE DATABASE IF NOT EXISTS `vn2008`;
CREATE TABLE IF NOT EXISTS `vn2008`.`payroll_categorias` (
`codcategoria` int(11) NOT NULL,
`descripcion` varchar(255) NOT NULL,
`Tarifa` tinyint(4) NOT NULL,
PRIMARY KEY (`codcategoria`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
CREATE TABLE IF NOT EXISTS `vn`.`businessCategory` (
`id` int(11) NOT NULL,
`description` varchar(255) NOT NULL,
`rate` tinyint(4) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
INSERT IGNORE INTO `vn`.`businessCategory` (`id`, `description`, `rate`)
SELECT codcategoria, descripcion, Tarifa FROM `vn2008`.`payroll_categorias`;
ALTER TABLE `vn`.`business` DROP FOREIGN KEY IF EXISTS`business_workerBusinessCategoryFk`;
ALTER TABLE `vn`.`business` ADD CONSTRAINT `business_workerBusinessCategoryFk` FOREIGN KEY (`workerBusinessCategoryFk`) REFERENCES `vn`.`businessCategory` (`id`) ON UPDATE CASCADE;
DROP TABLE `vn2008`.`payroll_categorias`;
CREATE OR REPLACE
ALGORITHM = UNDEFINED VIEW `vn2008`.`payroll_categorias` AS
select
`b`.`id` AS `codcategoria`,
`b`.`description` AS `descripcion`,
`b`.`rate` AS `Tarifa`
from
`vn`.`businessCategory` `b`;
-- replicate restrictions
GRANT SELECT ON TABLE `vn2008`.`payroll_categorias` TO hr;
GRANT SELECT ON TABLE `vn`.`businessCategory` TO hr;

View File

@ -22149,7 +22149,6 @@ CREATE TABLE `business` (
KEY `business_departmentFk_idx` (`departmentFk`),
KEY `business_workerBusinessProfessionalCategoryFk_idx` (`workerBusinessProfessionalCategoryFk`),
KEY `business_calendarTypeFk_idx` (`calendarTypeFk`),
KEY `business_workerBusinessCategoryFk` (`workerBusinessCategoryFk`),
KEY `business_workerBusinessTypeFk_idx` (`workerBusinessTypeFk`),
KEY `business_workerBusinessAgreementFk_idx` (`workerBusinessAgreementFk`),
CONSTRAINT `business_calendarTypeFk` FOREIGN KEY (`calendarTypeFk`) REFERENCES `postgresql`.`calendar_labour_type` (`calendar_labour_type_id`) ON UPDATE CASCADE,

View File

@ -89,7 +89,7 @@ module.exports = Self => {
ENGINE = MEMORY
SELECT
e.id,
e.reference,
e.invoiceNumber,
e.supplierFk,
t.shipped
FROM vn.entry e

View File

@ -40,9 +40,8 @@
<vn-td>{{::entry.id}}</vn-td>
<vn-th field="data">Date</vn-th>
<vn-td>{{::entry.shipped | date: 'dd/MM/yyyy'}}</vn-td>
<vn-th field="ref">Reference</vn-th>
///REVISAR
<vn-td vn-tooltip="{{::entry.reference}}">{{::entry.reference}}</vn-td>
<vn-th field="invoiceNumber">Reference</vn-th>
<vn-td vn-tooltip="{{::entry.invoiceNumber}}">{{::entry.invoiceNumber}}</vn-td>
</vn-tr>
</vn-thead>
<vn-tbody>