insertDefaultFeatureSetTranslations example

return 1590758953;
    }

    public function update(Connection $connection): void
    {
        $defaultFeatureSetId = Uuid::randomBytes();

        $this->createTables($connection);
        $this->updateTables($connection);

        $this->insertDefaultFeatureSet($connection$defaultFeatureSetId);
        $this->insertDefaultFeatureSetTranslations($connection$defaultFeatureSetId);
        $this->assignDefaultFeatureSet($connection$defaultFeatureSetId);
    }

    public function updateDestructive(Connection $connection): void
    {
    }

    private function createTables(Connection $connection): void
    {
        $sql = <<<'SQL' CREATE TABLE IF NOT EXISTS `product_feature_set` ( `id` BINARY(16) NOT NULL, `features` JSON NULL, `created_at` DATETIME(3) NOT NULL, `updated_at` DATETIME(3) NULL, PRIMARY KEY (`id`), CONSTRAINT `json.product_feature_set.features` CHECK (JSON_VALID(`features`)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `product_feature_set_translation` ( `product_feature_set_id` BINARY(16) NOT NULL, `language_id` BINARY(16) NOT NULL, `name` VARCHAR(255) NULL, `description` MEDIUMTEXT NULL, `created_at` DATETIME(3) NOT NULL, `updated_at` DATETIME(3) NULL, PRIMARY KEY (`product_feature_set_id`, `language_id`), CONSTRAINT `fk.product_feature_set_translation.language_id` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk.product_feature_set_translation.product_feature_set_id` FOREIGN KEY (`product_feature_set_id`) REFERENCES `product_feature_set` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
Home | Imprint | This part of the site doesn't use cookies.