Welcome Guest, Not a member yet? Register   Sign In
Using dbforge?
#4

[eluser]WanWizard[/eluser]
It's not going to work, because the dbforge database driver assumes it's a literal (string, number), an places any default value in single quotes.

The work-around is:
Code:
'date' => array("date TIMESTAMP DEFAULT CURRENT_TIMESTAMP")

if you pass a string as array value instead of an creating an associated array, the string is used as-is. Note that it is likely that this breaks database portability.

This is explained in the user guide, database library, dbforge, add_field.


Messages In This Thread
Using dbforge? - by El Forum - 09-16-2010, 06:01 AM
Using dbforge? - by El Forum - 09-16-2010, 06:41 AM
Using dbforge? - by El Forum - 09-16-2010, 08:00 AM
Using dbforge? - by El Forum - 09-16-2010, 09:42 AM
Using dbforge? - by El Forum - 09-16-2010, 09:55 AM
Using dbforge? - by El Forum - 09-16-2010, 01:48 PM
Using dbforge? - by El Forum - 06-17-2011, 06:03 PM
Using dbforge? - by El Forum - 08-02-2012, 02:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB