w0bm.com v1.5z FULL.RETARD.BUILD.BUT.STILL.WORKS
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateMessagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
\Illuminate\Support\Facades\Schema::create('messages', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedInteger('from')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
|
||||
$table->unsignedInteger('to')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
|
||||
$table->text('content');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
\Illuminate\Support\Facades\Schema::drop('messages');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user