From 158a71a32691c6cafb77aa61079e55470ac2d023 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 12 Dec 2022 13:37:14 +0100 Subject: [PATCH] restrictions --- db/changes/225001/.gitkeep | 1 - db/changes/225001/00-businessCategory.sql | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 db/changes/225001/.gitkeep diff --git a/db/changes/225001/.gitkeep b/db/changes/225001/.gitkeep deleted file mode 100644 index 7a4187c02..000000000 --- a/db/changes/225001/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -Delete this file diff --git a/db/changes/225001/00-businessCategory.sql b/db/changes/225001/00-businessCategory.sql index 941120062..3bc73b5c7 100644 --- a/db/changes/225001/00-businessCategory.sql +++ b/db/changes/225001/00-businessCategory.sql @@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS `vn`.`businessCategory` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci; -INSERT IGNORE INTO `vn`.`businessCategory` (id, description, rate) +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`; @@ -29,3 +29,8 @@ select `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;