mirror of https://github.com/movim/movim
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
647 B
27 lines
647 B
<?php
|
|
|
|
use Movim\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateInvitesTable extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$this->schema->create('invites', function (Blueprint $table) {
|
|
$table->string('code', 8);
|
|
$table->string('user_id', 64);
|
|
$table->string('resource', 128);
|
|
$table->timestamps();
|
|
|
|
$table->primary('code');
|
|
$table->foreign('user_id')
|
|
->references('id')->on('users')
|
|
->onDelete('cascade');
|
|
});
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->schema->drop('invites');
|
|
}
|
|
}
|