mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 09:18:54 +00:00
37 lines
705 B
PHP
37 lines
705 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateInvitationsTable extends Migration {
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('invitations', function(Blueprint $table)
|
|
{
|
|
$table->increments('id');
|
|
$table->string('guid', 50);
|
|
$table->integer('users_id')->unsigned()->index('FK_users_inv');
|
|
$table->timestamps();
|
|
$table->foreign('users_id', 'FK_users_inv')->references('id')->on('users')->onUpdate('CASCADE')->onDelete('CASCADE');
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('invitations');
|
|
}
|
|
|
|
}
|