Skip to content

Instantly share code, notes, and snippets.

@victorsteven
Last active April 15, 2019 16:15
Show Gist options
  • Save victorsteven/70ff8209fa7053fec1c6ff4b5341a819 to your computer and use it in GitHub Desktop.
Save victorsteven/70ff8209fa7053fec1c6ff4b5341a819 to your computer and use it in GitHub Desktop.
messages migration file
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMessagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('messages', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title');
$table->text('body');
$table->enum('delivered', ['YES', 'NO'])->default('NO');
$table->string('date_string')->nullable();
$table->timestamp('send_date');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('messages');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment