Welcome Guest, Not a member yet? Register   Sign In
forge->addColumn
#2

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
 
'email_private' => [ // the column name needs to be the key of the passed array
 
'type' => 'VARCHAR',
 
'constraint' => 128// 128 should be an int type (check the docs)
 
'default' => ''// keys are case-sensitive (check the docs); empty string as opposed to space
 
'null' => false// false should be boolean type (check the docs)
 
'after' => 'email_public'// the column after which to insert new 'email_private' column
 
],
]); 
Reply


Messages In This Thread
forge->addColumn - by Chroma - Yesterday, 10:24 AM
RE: forge->addColumn - by grimpirate - Yesterday, 12:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB