-- --------------------------------------------------------
-- Server OS:                    Win64
-- HeidiSQL Version:             12.10.0.7000
-- --------------------------------------------------------


-- Dumping structure for trigger alyblog.DELETE_POSTS_DEFAULT_CATEG
SET @OLDTMP_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
DELIMITER //
CREATE TRIGGER `DELETE_POSTS_DEFAULT_CATEG` BEFORE INSERT ON `alyblog_term_relationships` FOR EACH ROW if NEW.term_taxonomy_id = 1 THEN DELETE FROM wpcsi_term_relationships WHERE object_id = NEW.object_id; end if//
DELIMITER ;

