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.
37 lines
1.1 KiB
37 lines
1.1 KiB
<?php
|
|
|
|
use Movim\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreatePresencesTable extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$this->schema->create('presences', function (Blueprint $table) {
|
|
$table->string('session_id', 32);
|
|
$table->string('jid', 64);
|
|
$table->string('resource', 128);
|
|
$table->integer('value');
|
|
$table->integer('priority');
|
|
$table->string('status')->nullable();
|
|
$table->string('node')->nullable();
|
|
$table->dateTime('delay')->nullable();
|
|
$table->integer('last')->nullable();
|
|
$table->boolean('muc');
|
|
$table->string('mucjid')->nullable();
|
|
$table->string('mucaffiliation', 32)->nullable();
|
|
$table->string('mucrole', 32)->nullable();
|
|
$table->timestamps();
|
|
|
|
$table->primary(['session_id', 'jid', 'resource']);
|
|
$table->foreign('session_id')
|
|
->references('id')->on('sessions')
|
|
->onDelete('cascade');
|
|
});
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->schema->drop('presences');
|
|
}
|
|
}
|