Znacznik czasu MySQL w migracji Laravel
$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
Clever Corncrake
$table->timestamp('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
$table->string('name')->default('Hello World!');
$table->increments('id');
$table->string('name');
$table->string('url');
$table->string('country');
$table->tinyInteger('status')->default('1');
$table->timestamps();
Schema::table('users', function ($table) {
$table->integer('active')->default(0)->change();
});
$table->integer('parent_item_category_id')->nullable();
Schema::table('users', function ($table) {
$table->integer('active')->default(0)->change();
});