Files
archived-exercise-tracker-api/database/migrations/2020_04_26_162929_create_exercises_table.php
Kevin ANATOLE 8dbdb24ad6 Created exercises
- Added endpoint to retrieve the list of exercises
2020-04-26 20:33:09 +01:00

33 lines
649 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateExercisesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('exercises', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable(false)->unique();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('exercises');
}
}