Skip to content

Instantly share code, notes, and snippets.

@rachids
Created December 8, 2021 21:08
Show Gist options
  • Save rachids/7b8026a8045f245ace686319fb81ae52 to your computer and use it in GitHub Desktop.
Save rachids/7b8026a8045f245ace686319fb81ae52 to your computer and use it in GitHub Desktop.
Bunny Migration
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBunniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bunnies', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->tinyInteger('fluffiness');
$table->date('birth_date');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bunnies');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment