Jump to content

Schema rename column


Eduardo G.

Recommended Posts

Hi all!

I need to rename some columns when updating custom modules, but the Schema is giving me headache.
I want to use renameColumn method, but can't find the way.

This is what i tried:

Capsule::schema()->table('custom_table', function ($table) {
    $table->renameColumn('field_from', 'field_to');
});

Then I get the error.

Error: Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' 

What am I missing? Is there any other way?

Thanks all

Link to comment
Share on other sites

I suppose that that class is not included in WHMCS. From my experience there are many missing pieces like for example hasTable... that's why I refuse to use Capsule. I can't rely on such a class that lacks of many crucial methods.

Edited by Kian
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated