salix/db/install/changes/12-department.sql

23 lines
546 B
MySQL
Raw Normal View History

/* Ejecutar en prod * /
/* USE `vn2008`;
2019-03-12 14:04:09 +00:00
ALTER TABLE vn2008.department ADD `depth` int DEFAULT 0 NOT NULL;
ALTER TABLE vn2008.department ADD sons int DEFAULT 0 NOT NULL;
USE `vn`;
CREATE
OR REPLACE
VIEW `vn`.`department` AS select
`b`.`department_id` AS `id`,
`b`.`name` AS `name`,
`b`.`father_id` AS `fatherFk`,
`b`.`production` AS `isProduction`,
`b`.`lft` AS `lft`,
`b`.`rgt` AS `rgt`,
`b`.`isSelected` AS `isSelected`,
`b`.`depth` AS `depth`,
`b`.`sons` AS `sons`
from
`vn2008`.`department` `b`; */