forked from Alex/Pterodactyl-Panel
fc2b7b5982
Currently mysql does not support defaults for text and blobs without disabling strict mode in 5.7. https://dev.mysql.com/doc/refman/5.7/en/blob.html Mariadb (a drop in replacement for mysql my by the same team of devs as mysql) also doesnt support defaults text and blobs until 10.2.1 (there is no stable release, 10.2.5 is a release candidate) which isnt available on non-bleeding edge distro's. No one is going to install an unstable release of mariadb on production servers. https://mariadb.com/kb/en/mariadb/text/ Latest release for ubuntu xenial is 10.0.29-MariaDB So for now we change text to string for values that have defaults until defaults are more widely supported for TEXT and BLOB mysql values.
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class AddScriptsToServiceOptions extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::table('service_options', function (Blueprint $table) {
|
|
$table->text('script_install')->after('startup')->nullable();
|
|
$table->boolean('script_is_privileged')->default(true)->after('startup');
|
|
$table->string('script_entry')->default('ash')->after('startup');
|
|
$table->string('script_container')->default('alpine:3.4')->after('startup');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('service_options', function (Blueprint $table) {
|
|
$table->dropColumn('script_install');
|
|
$table->dropColumn('script_is_privileged');
|
|
$table->dropColumn('script_entry');
|
|
$table->dropColumn('script_container');
|
|
});
|
|
}
|
|
}
|