Files
beerable/database/migrations/2021_09_04_192641_create_beers_table.php

37 lines
774 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBeersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('beers', function (Blueprint $table) {
$table->id();
$table->string('beer');
$table->integer('rating');
$table->string('country');
$table->string('type');
$table->string('review')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('beers');
}
}