forge->addColumn |
Hi All,
CI 4.6.1. I am trying to add a new column to an existing table. I am not having any luck. PHP Code: $val = array(); getEmailFields looks like PHP Code: protected function getEmailField() The error I am getting is an exception inside forge->addField. It seems that for some reason, it doesn't like the VARCHAR part of the definition. It throws a "Field information is required for that operation." exception, from line 387. The variable $val contains:
I don't see what I have done wrong and cannot find the error on the internet to track it down further. Any help is much appreciated.
I'm not understanding the majority of what your code does, but here is what it looks like in the simplest form to do what I think you're trying to achieve (try it and report back):
PHP Code: $this->forge->addColumn('entry_requests', [ //'entry_requests' is the table name |
Welcome Guest, Not a member yet? Register Sign In |