add column and update alias

This commit is contained in:
Daniel Maya 2016-10-06 16:39:44 +02:00
parent cf3d44872f
commit 18bfa9e2ac
2 changed files with 14 additions and 0 deletions

View File

@ -68,3 +68,10 @@ ALTER TABLE tevent_filter ADD COLUMN `date_to` date DEFAULT NULL;
-- ---------------------------------------------------------------------
ALTER TABLE tusuario ADD (`id_filter` int(10) unsigned NULL default NULL);
ALTER TABLE tusuario ADD CONSTRAINT fk_id_filter FOREIGN KEY (id_filter) REFERENCES tevent_filter(id_filter) ON DELETE SET NULL;
-- ---------------------------------------------------------------------
-- Table `tagente`
-- ---------------------------------------------------------------------
ALTER TABLE tagente ADD COLUMN (alias varchar(600) not null default '');
UPDATE tagente SET tagente.alias = tagente.nombre;

View File

@ -67,3 +67,10 @@ ALTER TABLE tevent_filter ADD COLUMN date_to date DEFAULT NULL;
-- ---------------------------------------------------------------------
ALTER TABLE tusuario ADD (id_filter int(10) unsigned NULL default NULL);
ALTER TABLE tusuario ADD CONSTRAINT fk_id_filter FOREIGN KEY (id_filter) REFERENCES tevent_filter(id_filter) ON DELETE SET NULL;
-- ---------------------------------------------------------------------
-- Table `tagente`
-- ---------------------------------------------------------------------
ALTER TABLE tagente ADD COLUMN (alias VARCHAR2(600) not null DEFAULT '');
UPDATE `tagente` SET tagente.alias = tagente.nombre;