Hi everyone,
I am trying to make a simple DB migration, renaming a column in an existing table. I tripled checked my migration file, connection and everything I could think of but I am stuck with an error and have no idea what to do. Can you help me understand where the problem is?
My migration:
PHP Code:
public function up()
{
$fields = [
"title" => [
"name" => "title_en",
"type" => "VARCHAR",
"null" => false,
],
];
$this->forge->modifyColumn("news", $fields);
}
The error I am getting:
Code:
An uncaught Exception was encountered
Type: CodeIgniter\Database\Exceptions\DatabaseException
Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL' at line 2
Filename: /Users/karine/Dev/ci-test/vendor/codeigniter4/framework/system/Database/BaseConnection.php
Line Number: 646
Any idea what could be going on?