Skip to main content

I suggest you to use MYSQL trigger :

DELIMITER $$ CREATE TRIGGER topseller_int BEFORE UPDATE ON eav_attribute FOR EACH ROW BEGIN IF NEW.attribute_code = 'topseller' THEN SET NEW.backend_type = 'int'; END IF; END;$$

DELIMITER ;

DELIMITER $$
CREATE TRIGGER topseller_int BEFORE UPDATE ON eav_attribute
FOR EACH ROW 
BEGIN
  IF NEW.attribute_code = 'topseller' THEN
    SET NEW.backend_type = 'int';
  END IF;
END;$$

DELIMITER ;

So that the backend-type of the attribute will always remains as you described. Hope it will help you.

I suggest you to use MYSQL trigger :

DELIMITER $$ CREATE TRIGGER topseller_int BEFORE UPDATE ON eav_attribute FOR EACH ROW BEGIN IF NEW.attribute_code = 'topseller' THEN SET NEW.backend_type = 'int'; END IF; END;$$

DELIMITER ;

So that the backend-type of the attribute will always remains as you described. Hope it will help you.

I suggest you to use MYSQL trigger :

DELIMITER $$
CREATE TRIGGER topseller_int BEFORE UPDATE ON eav_attribute
FOR EACH ROW 
BEGIN
  IF NEW.attribute_code = 'topseller' THEN
    SET NEW.backend_type = 'int';
  END IF;
END;$$

DELIMITER ;

So that the backend-type of the attribute will always remains as you described. Hope it will help you.

Source Link
Khushbu_sipl
  • 1.1k
  • 10
  • 18

I suggest you to use MYSQL trigger :

DELIMITER $$ CREATE TRIGGER topseller_int BEFORE UPDATE ON eav_attribute FOR EACH ROW BEGIN IF NEW.attribute_code = 'topseller' THEN SET NEW.backend_type = 'int'; END IF; END;$$

DELIMITER ;

So that the backend-type of the attribute will always remains as you described. Hope it will help you.