Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursosdesarrolloweb/751a327f06704c52ef4b48a2ccbcdd3d to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/751a327f06704c52ef4b48a2ccbcdd3d to your computer and use it in GitHub Desktop.
<?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