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.
 
 
 
 

30 lines
789 B

<?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddBundleIdToMessagesTable extends Migration
{
public function up()
{
$this->schema->table('messages', function (Blueprint $table) {
$table->integer('bundleid')->nullable();
$table->index('bundleid');
});
$this->schema->table('bundles', function (Blueprint $table) {
$table->renameColumn('bundle_id', 'bundleid');
});
}
public function down()
{
$this->schema->table('messages', function (Blueprint $table) {
$table->dropColumn('bundleid');
});
$this->schema->table('bundles', function (Blueprint $table) {
$table->renameColumn('bundleid', 'bundle_id');
});
}
}