Created
July 17, 2021 12:22
-
-
Save cursosdesarrolloweb/751a327f06704c52ef4b48a2ccbcdd3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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