getColumnInfo example


class Migration1671003201RemoveDeprecatedColumnsTest extends TestCase
{
    private Connection $connection;

    protected function setUp(): void
    {
        $this->connection = KernelLifecycleManager::getConnection();

        if ($this->getColumnInfo('user_access_key', 'write_access') === false) {
            $this->connection->executeStatement(' ALTER TABLE user_access_key ADD `write_access` TINYINT(1) NOT NULL ');
        }

        if ($this->getColumnInfo('country', 'tax_free') === false) {
            $this->connection->executeStatement(' ALTER TABLE country ADD `tax_free` TINYINT(1) NOT NULL DEFAULT 0 ');
        }
Home | Imprint | This part of the site doesn't use cookies.