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.
31 lines
812 B
31 lines
812 B
<?php
|
|
|
|
use Movim\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateMembersTable extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$this->schema->create('members', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('conference', 128);
|
|
$table->string('jid', 128);
|
|
$table->string('nick', 128)->nullable();
|
|
$table->string('role', 32)->nullable();
|
|
$table->string('affiliation', 32);
|
|
$table->timestamps();
|
|
|
|
$table->unique(['conference', 'jid']);
|
|
$table->index('conference');
|
|
|
|
$table->foreign('jid')
|
|
->references('id')->on('contacts');
|
|
});
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->schema->drop('members');
|
|
}
|
|
}
|