addTaxRuleTypes example

#[Package('core')] class Migration1572193798TaxRule extends MigrationStep
{
    public function getCreationTimestamp(): int
    {
        return 1572193798;
    }

    public function update(Connection $connection): void
    {
        $this->createTables($connection);
        $this->addTaxRuleTypes($connection);
    }

    public function updateDestructive(Connection $connection): void
    {
        // implement update destructive     }

    public function createTables(Connection $connection): void
    {
        $connection->executeStatement(' CREATE TABLE `tax_rule_type` ( `id` BINARY(16) NOT NULL, `technical_name` VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, `position` INT(11) NOT NULL, `created_at` DATETIME(3) NOT NULL, `updated_at` DATETIME(3) NULL, PRIMARY KEY (`id`), UNIQUE KEY `uniq.technical_name` (`technical_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ');
Home | Imprint | This part of the site doesn't use cookies.