qcod / laravel-gamify

Gamify your Laravel app with Reputation Points & Achievements Badges support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rolling back migration throws error when using SQLite

ronnyandre opened this issue · comments

When using SQLite file as database, rolling back migration for a complete refresh using the following command:

php artisan migrate:refresh

This command throws the following error:

Rolling back: 2018_12_10_143555_create_gamify_tables
Rolled back:  2018_12_10_143555_create_gamify_tables
Rolling back: 2018_12_10_143555_add_reputation_field_on_user_table

   Symfony\Component\Debug\Exception\FatalThrowableError  : Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found

  at /Users/Me/Sites/todo/vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php:88
    84|      * @return \Doctrine\DBAL\Driver\PDOSqlite\Driver
    85|      */
    86|     protected function getDoctrineDriver()
    87|     {
  > 88|         return new DoctrineDriver;
    89|     }
    90| 
    91|     /**
    92|      * Get the database connection foreign key constraints configuration option.

  Exception trace:

  1   Illuminate\Database\SQLiteConnection::getDoctrineDriver()
      /Users/Me/Sites/todo/vendor/laravel/framework/src/Illuminate/Database/Connection.php:885

  2   Illuminate\Database\Connection::getDoctrineSchemaManager()
      /Users/Me/Sites/todo/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php:267

@ronnyandre You will need to run composer require doctrine/dbal in order to support modifying columns in migration.

I will mention this in readme.

Great, works like a charm.