Switch to JSON from TEXT when storing denylist items for an egg; closes #3034
This commit is contained in:
parent
b7d1c45bcc
commit
b00def2537
7 changed files with 89 additions and 30 deletions
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue