Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel add timestamps to existing table

$table->dateTime('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
$table->dateTime('updated_at')->nullable();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #add #timestamps #existing #table
ADD COMMENT
Topic
Name
5+5 =