Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created November 19, 2021 07:32
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/b3a6585a4c17bdea13274b0717d75981 to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/b3a6585a4c17bdea13274b0717d75981 to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('projects', function (Blueprint $table) {
$table->id();
$table->string("name", 100)->unique();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('projects');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment