Have you tried just adding one or the other, but not both?
$table->timestamp('updated_at')
->nullable()
->useCurrentOnUpdate()
->change();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a migration that removes / adds automatic timestamp updating from created_at and updated_at columns (I have enabled the timestamp DBAL option in my config):
//up
Schema::table(
'users',
static function (Blueprint $table) {
$table->timestamp('created_at')
->nullable()
->default(null)
->change();
$table->timestamp('updated_at')
->nullable()
->default(null)
->change();
}
//down
Schema::table(
'users',
static function (Blueprint $table) {
$table->timestamp('created_at')
->nullable()
->useCurrent()
->change();
$table->timestamp('updated_at')
->nullable()
->useCurrent()
->useCurrentOnUpdate()
->change();
}
);
The up change works fine, and the automatic update options are removed successfully, but adding them back on in the down migration doesn't work. I logged the queries and both schema changes generate exactly the same queries!
ALTER TABLE users CHANGE updated_at updated_at TIMESTAMP NULL DEFAULT NULL, CHANGE created_at created_at TIMESTAMP NULL DEFAULT NULL
As you can see, the ON UPDATE options are simply not there. Skipping the nullable calls doesn't help either.
Why don't useCurrent and useCurrentOnUpdate work in a schema change?
Please or to participate in this conversation.