Created
October 7, 2022 19:37
-
-
Save Sammyjo20/279707a8f7849a44e5aab445726b1ed4 to your computer and use it in GitHub Desktop.
Migrate Haystack Tables from v0.9.0 to v0.10.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
return new class extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
Schema::table('haystacks', function (Blueprint $table) { | |
$table->mediumText('callbacks')->nullable(); | |
$table->mediumText('middleware')->change(); | |
$table->dropColumn('on_then'); | |
$table->dropColumn('on_catch'); | |
$table->dropColumn('on_finally'); | |
$table->dropColumn('on_paused'); | |
}); | |
Schema::table('haystack_bales', function (Blueprint $table) { | |
$table->mediumText('job')->change(); | |
}); | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
Schema::table('haystacks', function (Blueprint $table) { | |
$table->text('on_then')->nullable(); | |
$table->text('on_catch')->nullable(); | |
$table->text('on_finally')->nullable(); | |
$table->text('on_paused')->nullable(); | |
$table->dropColumn('callbacks'); | |
$table->text('middleware')->change(); | |
}); | |
Schema::table('haystack_bales', function (Blueprint $table) { | |
$table->mediumText('job')->change(); | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment