Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when changing columns #3

Open
joaobarbosa opened this issue May 29, 2016 · 2 comments
Open

Problem when changing columns #3

joaobarbosa opened this issue May 29, 2016 · 2 comments

Comments

@joaobarbosa
Copy link

Hi @patrickcarlohickman, I've been having some problems when changing columns.

What's going on: I've got a table with a string-type field, but, I'd like to use "citext" from Postgres. Here is my migration:

// ...
    public function up()
    {
        Schema::table('posts', function (Blueprint $table) {
            $table->passthru('citext', 'title')->unique()->change();
        });
    }
// ...

When I try to run the migration, it raises a Doctrine\DBAL\DBALException, pointing out to passthru field:

Unknown column type "passthru" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgot to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping information. 

I don't have enough time to go deeper on it right now, but I will update this issue with any additional info I'm able to find out later. Anyway, if it is simple as adding it to Doctrine known-types, I think it should be pointed out in the docs. :)

Thanks!

@BlackDeer
Copy link

Just commenting to note that I got this error as well. Pretty much the same kind of migration.

@theejhay
Copy link

theejhay commented Apr 1, 2022

Same Here, any solution yet ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants