Welcome Guest, Not a member yet? Register   Sign In
On Update Database Forge Fields
#1

Is it possible to specify the 'on update' section of a new field like the below snippet? Or this something that can be considered for CI4?

I know I can create the field manually, but it looks a lot cleaner like this, especially for developer on-boarding.

PHP Code:
$this->forge->addFields([
    
'field_name' => [
        
'type' => 'DATETIME',
        
'default' => 'CURRENT_TIMESTAMP',
        
'update' => 'CURRENT_TIMESTAMP'
    
]
]);
$this->forge->createTable('table_name'); 
Kristian Matthews-Kennington
Apple Certified Associate Mac Integration & Management 10.10
Reply


Messages In This Thread
On Update Database Forge Fields - by EpicKris - 01-01-2017, 02:22 PM
RE: On Update Database Forge Fields - by kilishan - 01-01-2017, 08:46 PM
RE: On Update Database Forge Fields - by EpicKris - 01-02-2017, 04:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB