Created
October 1, 2022 08:11
-
-
Save Sammyjo20/9db0ccea0914455bd6289bd904bab90a to your computer and use it in GitHub Desktop.
Migrate Haystack tables to v0.8.x
This file contains hidden or 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\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class AddMissingHaystackColumnsFromVersionZeroDotEight extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
Schema::table('haystacks', function (Blueprint $table) { | |
$table->dropColumn('return_data'); | |
$table->text('options'); | |
}); | |
Schema::table('haystack_data', function (Blueprint $table) { | |
$table->longText('value')->change(); | |
}); | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
Schema::table('haystacks', function (Blueprint $table) { | |
$table->dropColumn('options'); | |
$table->boolean('return_data')->default(true); | |
}); | |
Schema::table('haystack_data', function (Blueprint $table) { | |
$table->binary('value')->change(); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment