src/Controller/Admin/Setup/Helpers/Schema.php
private function createPropertyValuesTable() {
        $this->database->query("DROP TABLE IF EXISTS `?property_values`;");
        $this->database->query(
            "CREATE TABLE IF NOT EXISTS `?property_values` (
                    `value_id` mediumint(11) NOT NULL AUTO_INCREMENT,
                    `value_data` text NOT NULL,
                    `value_updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
                    `property_id` int(11) NOT NULL,
                    `object_id` int(11) NOT NULL,
                    PRIMARY KEY (`value_id`),
                    UNIQUE KEY `object_property_uid` (`object_id`,`property_id`),
                    KEY `property_id_idxfk` (`property_id`),
                    KEY `object_id_idxfk` (`object_id`)
                  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;"
        );
        $this->database->query("DROP PROCEDURE IF EXISTS `property_value_validate`;");
        $this->database->query(
            "CREATE PROCEDURE `?property_value_validate`(IN _property_id INT, IN _value_data LONGTEXT) 
                BEGIN 
                    DECLARE _validationFails CONDITION FOR SQLSTATE '99001';
                    DECLARE _dataTypeRegExp VARCHAR(255); 
                    DECLARE _signalText TEXT;
                    SELECT r.datatype_validation  FROM `?properties` AS d INNER JOIN `?property_datatypes` AS r WHERE `property_id`= _property_id AND d.property_datatype=r.datatype_name INTO _dataTypeRegExp;
                    IF (_dataTypeRegExp IS NOT NULL) THEN
                            IF (_value_data NOT REGEXP(_dataTypeRegExp)) THEN
                            	SET _signalText = CONCAT('The inserted/updated value fails the property data type validation');
                                SIGNAL _validationFails SET MESSAGE_TEXT=_signalText; 
                            END IF;
                    END IF;
                END;"
        );

        $this->database->query("DROP TRIGGER IF EXISTS `?property_value_validate_insert`;");
        $this->database->query(
            "CREATE TRIGGER `?property_value_validate_insert` BEFORE INSERT ON `?property_values`
                FOR EACH ROW
                BEGIN
                    CALL ?property_value_validate(NEW.property_id, NEW.value_data);
                END;"
        );

        $this->database->query("DROP TRIGGER IF EXISTS `?property_value_validate_update`;");
        $this->database->query(
            "CREATE TRIGGER `?property_value_validate_update` BEFORE UPDATE ON `?property_values`
                FOR EACH ROW
                BEGIN
                    CALL ?property_value_validate(NEW.property_id, NEW.value_data);
                END;"
        );
    }
private function createPropertyValuesTable() {
        $this->database->query("DROP TABLE IF EXISTS `?property_values`;");
        $this->database->query(
            "CREATE TABLE IF NOT EXISTS `?property_values` (
                    `value_id` mediumint(11) NOT NULL AUTO_INCREMENT,
                    `value_data` text NOT NULL,
                    `value_updated_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
                    `property_id` int(11) NOT NULL,
                    `object_id` int(11) NOT NULL,
                    PRIMARY KEY (`value_id`),
                    UNIQUE KEY `object_property_uid` (`object_id`,`property_id`),
                    KEY `property_id_idxfk` (`property_id`),
                    KEY `object_id_idxfk` (`object_id`)
                  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;"
        );
        $this->database->query("DROP PROCEDURE IF EXISTS `property_value_validate`;");
        $this->database->query(
            "CREATE PROCEDURE `?property_value_validate`(IN _property_id INT, IN _value_data LONGTEXT) 
                BEGIN 
                    DECLARE _validationFails CONDITION FOR SQLSTATE '99001';
                    DECLARE _dataTypeRegExp VARCHAR(255); 
                    DECLARE _signalText TEXT;
                    SELECT r.datatype_validation  FROM `?properties` AS d INNER JOIN `?property_datatypes` AS r WHERE `property_id`= _property_id AND d.property_datatype=r.datatype_name INTO _dataTypeRegExp;
                    IF (_dataTypeRegExp IS NOT NULL) THEN
                            IF (_value_data NOT REGEXP(_dataTypeRegExp)) THEN
                            	SET _signalText = CONCAT('The inserted/updated value fails the property data type validation');
                                SIGNAL _validationFails SET MESSAGE_TEXT=_signalText; 
                            END IF;
                    END IF;
                END;"
        );

        $this->database->query("DROP TRIGGER IF EXISTS `?property_value_validate_insert`;");
        $this->database->query(
            "CREATE TRIGGER `?property_value_validate_insert` BEFORE INSERT ON `?property_values`
                FOR EACH ROW
                BEGIN
                    CALL ?property_value_validate(NEW.property_id, NEW.value_data);
                END;"
        );

        $this->database->query("DROP TRIGGER IF EXISTS `?property_value_validate_update`;");
        $this->database->query(
            "CREATE TRIGGER `?property_value_validate_update` BEFORE UPDATE ON `?property_values`
                FOR EACH ROW
                BEGIN
                    CALL ?property_value_validate(NEW.property_id, NEW.value_data);
                END;"
        );
    }
Query for creating the property values table
@return void