Switch to JSON from TEXT when storing denylist items for an egg; closes #3034

This commit is contained in:
Dane Everitt 2021-01-26 21:08:53 -08:00
parent b7d1c45bcc
commit b00def2537
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 89 additions and 30 deletions

View file

@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateFileDenylistToJson extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('eggs', function (Blueprint $table) {
$table->dropColumn('file_denylist');
});
Schema::table('eggs', function (Blueprint $table) {
$table->json('file_denylist')->nullable()->after('docker_images');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('eggs', function (Blueprint $table) {
$table->dropColumn('file_denylist');
});
Schema::table('eggs', function (Blueprint $table) {
$table->text('file_denylist')->after('docker_images');
});
}
}