-- adds column to table
ALTER TABLE `vn2008`.`gesttip` 
ADD COLUMN `code` VARCHAR(45) NOT NULL AFTER `readRoleFk`;

-- adds column to view
CREATE 
     OR REPLACE ALGORITHM = UNDEFINED 
    DEFINER = `root`@`%` 
    SQL SECURITY DEFINER
VIEW `vn`.`dmsType` AS
    SELECT 
        `g`.`id` AS `id`,
        `g`.`tipo` AS `name`,
        `g`.`path` AS `path`,
        `g`.`readRoleFk` AS `readRoleFk`,
        `g`.`writeRoleFk` AS `writeRoleFk`,
        `g`.`code` AS `code`
    FROM
        `vn2008`.`gesttip` `g`;


