Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateServicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('services', function (Blueprint $table) {
$table->id();
$table->foreignId("user_id")->constrained();
$table->string("name", 100);
$table->float("default_hourly_rate_per_service")->comment("Precio hora por defecto para este proyecto");
$table->text("comments")->nullable()->comment("Notas adicionales de interés");
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('services');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment