eZ\Bundle\EzPublishMigrationBundle\Command\LegacyStorage\RegenerateUrlAliasesCommand::createGlobalUrlAliasBackupTable PHP Method

createGlobalUrlAliasBackupTable() protected method

Creates database table for custom URL alias backup.
    protected function createGlobalUrlAliasBackupTable()
    {
        $schema = new Schema();
        $table = $schema->createTable(static::GLOBAL_ALIAS_BACKUP_TABLE);
        $table->addColumn('id', 'integer', ['autoincrement' => true]);
        $table->addColumn('resource', 'text');
        $table->addColumn('path', 'text');
        $table->addColumn('language_code', 'string');
        $table->addColumn('always_available', 'integer');
        $table->addColumn('forwarding', 'integer');
        $table->setPrimaryKey(['id']);
        $queries = $schema->toSql($this->connection->getDatabasePlatform());
        foreach ($queries as $query) {
            $this->connection->exec($query);
        }
    }