Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
7
Help us understand the problem. What is going on with this article?
@MasatoYoshioka@github

laravel4 migrate カラム名変更

More than 5 years have passed since last update.

migrateでカラム変更


Schema::table('table',function($table){
  $table->renameColumn('name', 'value');
});

とカラム名を変更しようとしたらエラーがでた。

[2014-06-13 07:00:50] production.DEBUG: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found' in /path/to/laravel-project/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php:59
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []

DoctrineのMysqlドライバーがないと。
調べたら本当になかったので、インストールした。

composer.json
    "require": {
        "laravel/framework": "4.1.*",
        "doctrine/dbal": "~2.3"
    },
%composer update
%php artisan migrate

リネームできた。

OK

7
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
bengo4
「専門家をもっと身近に」を理念として、人々と専門家をつなぐポータルサイト「弁護士ドットコム」「弁護士ドットコムニュース」「税理士ドットコム」を提供。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
7
Help us understand the problem. What is going on with this article?