Im trying to rename a database column in my localhost so that i can later do it in development and production
Im using laravel 5 and installed doctrine dbal.
Code of my migration:
$table->renameColumn('puesto', 'aux');
After I run php artisan migrate
it tells me that
[Doctrine\DBAL\DBALException]
Unknown database type json requested, Doctrine\DBAL\Platforms\PostgreSqlPlatform may not support it.
The column im trying to rename isnt even json, although there are json column in the table, in fact only one called 'alianzas'. My question is, how can i rename the columns from the migration and not manually in the database.
This error still occurs in Laravel 5.1, even when doctrine/dbal
is installed.
As a temporary workaround, you could write your migration in raw SQL like so:
public function up(){
DB::statement("ALTER TABLE table_name RENAME puesto TO aux");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With