-
Notifications
You must be signed in to change notification settings - Fork 889
Closed
Description
Hello, I'm trying to write a simple seeder:
class MySeeder extends AbstractSeed
{
public function run(): void
{
$data = [
[
'user_name' => 'Administrator',
'user_creation' => 'CURRENT_TIMESTAMP',
]
];
$table = $this->table('users');
$table->insert($data)->saveData();
}
}
Executing this seeder fails:
[PDOException (22007)]
SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'CURRENT_TIMESTAMP' for column 'user_creation' at row 1
I explored the code a bit, and tried using Literal and Expression, but got the same result.
Is there a way to achieve this?