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

createCustomLocationUrlAliasBackupTable() protected method

Creates database table for custom Location URL alias backup.
    protected function createCustomLocationUrlAliasBackupTable()
    {
        $schema = new Schema();
        $table = $schema->createTable(static::CUSTOM_ALIAS_BACKUP_TABLE);
        $table->addColumn('id', 'integer', ['autoincrement' => true]);
        $table->addColumn('location_id', 'integer');
        $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);
        }
    }