changed id_user field length from tusuario
This commit is contained in:
parent
09729c3100
commit
5c789125f2
|
@ -0,0 +1,15 @@
|
|||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `tuser_double_auth` DROP FOREIGN KEY `tuser_double_auth_ibfk_1`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tnotification_user` DROP FOREIGN KEY `tnotification_user_ibfk_2`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tnotification_source_user` DROP FOREIGN KEY `tnotification_source_user_ibfk_2`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tnotification_source_group_user` DROP FOREIGN KEY `tnotification_source_group_user_ibfk_2`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tvisual_console_elements_cache` DROP FOREIGN KEY `tvisual_console_elements_cache_ibfk_3`, MODIFY `user_id` VARCHAR(255) DEFAULT NULL;
|
||||
ALTER TABLE `tusuario` MODIFY `id_user` VARCHAR(255) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `tuser_double_auth` ADD CONSTRAINT `tuser_double_auth_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE;
|
||||
ALTER TABLE `tnotification_user` ADD CONSTRAINT `tnotification_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `tnotification_source_user` ADD CONSTRAINT `tnotification_source_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `tnotification_source_group_user` ADD CONSTRAINT `tnotification_source_group_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `tvisual_console_elements_cache` ADD CONSTRAINT `tvisual_console_elements_cache_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
COMMIT;
|
|
@ -4338,3 +4338,18 @@ ALTER TABLE `talert_special_days` DROP COLUMN `same_day`;
|
|||
ALTER TABLE `talert_special_days` ADD FOREIGN KEY (`id_calendar`) REFERENCES `talert_calendar`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
UPDATE `tconfig` c1 JOIN (select count(*) as n FROM `tconfig` c2 WHERE (c2.`token` = "node_metaconsole" AND c2.`value` = 1) OR (c2.`token` = "centralized_management" AND c2.`value` = 1) ) v SET c1. `value` = 0 WHERE c1.token = "autocreate_remote_users" AND v.n = 2;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tusuario`
|
||||
-- ----------------------------------------------------------------------
|
||||
ALTER TABLE `tuser_double_auth` DROP FOREIGN KEY `tuser_double_auth_ibfk_1`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tnotification_user` DROP FOREIGN KEY `tnotification_user_ibfk_2`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tnotification_source_user` DROP FOREIGN KEY `tnotification_source_user_ibfk_2`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tnotification_source_group_user` DROP FOREIGN KEY `tnotification_source_group_user_ibfk_2`, MODIFY `id_user` VARCHAR(255) NOT NULL;
|
||||
ALTER TABLE `tvisual_console_elements_cache` DROP FOREIGN KEY `tvisual_console_elements_cache_ibfk_3`, MODIFY `user_id` VARCHAR(255) DEFAULT NULL;
|
||||
ALTER TABLE `tusuario` MODIFY `id_user` VARCHAR(255) NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `tuser_double_auth` ADD CONSTRAINT `tuser_double_auth_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE;
|
||||
ALTER TABLE `tnotification_user` ADD CONSTRAINT `tnotification_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `tnotification_source_user` ADD CONSTRAINT `tnotification_source_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `tnotification_source_group_user` ADD CONSTRAINT `tnotification_source_group_user_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
ALTER TABLE `tvisual_console_elements_cache` ADD CONSTRAINT `tvisual_console_elements_cache_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `tusuario` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
|
|
@ -1260,7 +1260,7 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` (
|
|||
-- Table `tusuario`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tusuario` (
|
||||
`id_user` VARCHAR(60) NOT NULL DEFAULT '0',
|
||||
`id_user` VARCHAR(255) NOT NULL DEFAULT '0',
|
||||
`fullname` VARCHAR(255) NOT NULL,
|
||||
`firstname` VARCHAR(255) NOT NULL,
|
||||
`lastname` VARCHAR(255) NOT NULL,
|
||||
|
@ -1328,7 +1328,7 @@ CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
|
|||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tuser_double_auth` (
|
||||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_user` VARCHAR(60) NOT NULL,
|
||||
`id_user` VARCHAR(255) NOT NULL,
|
||||
`secret` VARCHAR(20) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (`id_user`),
|
||||
|
@ -1388,7 +1388,7 @@ CREATE TABLE IF NOT EXISTS `tmensajes` (
|
|||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnotification_user` (
|
||||
`id_mensaje` INT UNSIGNED NOT NULL,
|
||||
`id_user` VARCHAR(60) NOT NULL,
|
||||
`id_user` VARCHAR(255) NOT NULL,
|
||||
`utimestamp_read` BIGINT,
|
||||
`utimestamp_erased` BIGINT,
|
||||
`postpone` INT,
|
||||
|
@ -1415,7 +1415,7 @@ CREATE TABLE IF NOT EXISTS `tnotification_group` (
|
|||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnotification_source_user` (
|
||||
`id_source` BIGINT UNSIGNED NOT NULL,
|
||||
`id_user` VARCHAR(60),
|
||||
`id_user` VARCHAR(255),
|
||||
`enabled` INT DEFAULT NULL,
|
||||
`also_mail` INT DEFAULT NULL,
|
||||
PRIMARY KEY (`id_source`,`id_user`),
|
||||
|
@ -1443,7 +1443,7 @@ CREATE TABLE IF NOT EXISTS `tnotification_source_group` (
|
|||
CREATE TABLE IF NOT EXISTS `tnotification_source_group_user` (
|
||||
`id_source` BIGINT UNSIGNED NOT NULL,
|
||||
`id_group` MEDIUMINT UNSIGNED NOT NULL,
|
||||
`id_user` VARCHAR(60),
|
||||
`id_user` VARCHAR(255),
|
||||
`enabled` INT DEFAULT NULL,
|
||||
`also_mail` INT DEFAULT NULL,
|
||||
PRIMARY KEY (`id_source`,`id_user`),
|
||||
|
@ -3836,7 +3836,7 @@ CREATE TABLE IF NOT EXISTS `tvisual_console_elements_cache` (
|
|||
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`vc_id` INT UNSIGNED NOT NULL,
|
||||
`vc_item_id` INT UNSIGNED NOT NULL,
|
||||
`user_id` VARCHAR(60) DEFAULT NULL,
|
||||
`user_id` VARCHAR(255) DEFAULT NULL,
|
||||
`data` TEXT,
|
||||
`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`expiration` INT UNSIGNED NOT NULL COMMENT 'Seconds to expire',
|
||||
|
|
Loading…
Reference in New Issue