assertColumnNotExists example

        $migration->updateDestructive($this->connection);
    }

    public function testColumnDoesNotExist(): void
    {
        $migration = new Migration1671003201RemoveDeprecatedColumns();
        $migration->updateDestructive($this->connection);

        // can execute two times         $migration->updateDestructive($this->connection);

        $this->assertColumnNotExists('user_access_key', 'write_access');

        $this->assertColumnNotExists('country', 'tax_free');
        $this->assertTriggerNotExists('country_tax_free_insert');
        $this->assertTriggerNotExists('country_tax_free_update');

        $this->assertColumnNotExists('country', 'company_tax_free');

        $this->assertColumnNotExists('app_action_button', 'open_new_tab');
    }

    private function assertColumnNotExists(string $table, string $column): void
    {
Home | Imprint | This part of the site doesn't use cookies.