私の移行 add_column
class Migration_Add_post_to_post extends CI_Migration {
public function up() {
$fields = array(
'post' => array('type' => 'TEXT')
);
$this->dbforge->add_column('posts', $fields);
}
public function down() {
$this->dbforge->drop_column('posts', 'post');
}
}
コードの実行時に Codeigniter がデータベース エラーをスローする
ERROR: syntax error at or near "Array" LINE 1: ALTER TABLE "posts" ADD Array NOT NULL ^
この問題は github https://github.com/EllisLab/CodeIgniter/issues/808で見つかりました。問題はクローズされましたが、mysql ドライバーを除いてまだバグが存在しているようです。
その問題を回避する方法はありますか?