-- -----------------------------------------------------
-- Table tagCacheT
-- -----------------------------------------------------

/*
-- use on MySQL < 5.6 ONLY - the commands break data integrity

alter table tagCacheT drop foreign key fk_tagCacheT_tagT1;
alter table tagCacheT engine=MyISAM;
*/


alter table tagCacheT add fulltext tagnamesfullsearch_ft (tagNamesFullSearch);

-- -----------------------------------------------------
-- Table tagExtraNameT
-- -----------------------------------------------------
DROP TABLE IF EXISTS tagExtraNameT ;

CREATE TABLE IF NOT EXISTS tagExtraNameT (
  id INT UNSIGNED NOT NULL,
  extraName TEXT NOT NULL,
  PRIMARY KEY (id),
  CONSTRAINT fk_tagExtraNameT_tagT1
    FOREIGN KEY (id)
    REFERENCES tagT (id)
    ON DELETE CASCADE
    ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'extra names used to assist in search';


-- refresh all caches
-- select __tag_UpdateCacheAll(null);
