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.
 
 
 
 

29 lines
701 B

<?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class DropBundleSessionsTable extends Migration
{
public function up()
{
$this->schema->drop('bundle_sessions');
}
public function down()
{
$this->schema->create('bundle_sessions', function (Blueprint $table) {
$table->increments('id');
$table->integer('bundle_id')->unsigned();
$table->string('deviceid', 64);
$table->foreign('bundle_id')
->references('id')->on('bundles')
->onDelete('cascade');
$table->unique(['bundle_id', 'deviceid']);
$table->timestamps();
});
}
}