It would be handy if we could set default values for boolean and timestamp columns like this:
$table->boolean('active', true); // Results in a default value of 1.
$table->timestamp('added_on', 'CURRENT_TIMESTAMP');
Perhaps this could be handy for other columns as well, I didn't go over the entire list, I just mentioned these two use cases I encountered up until now.
What is wrong with $table->boolean('active')->default(true)
? It's much more consistent.
No, you're right. I missed that one.. Sorry for not thinking of that!
Most helpful comment
What is wrong with
$table->boolean('active')->default(true)
? It's much more consistent.