forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2017_03_10_162934_AddNewServiceOptionsColumns.php
More file actions
44 lines (37 loc) · 1.39 KB
/
2017_03_10_162934_AddNewServiceOptionsColumns.php
File metadata and controls
44 lines (37 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddNewServiceOptionsColumns extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropColumn('executable');
$table->unsignedInteger('config_from')->nullable()->after('docker_image');
$table->string('config_stop')->nullable()->after('docker_image');
$table->text('config_logs')->nullable()->after('docker_image');
$table->text('config_startup')->nullable()->after('docker_image');
$table->text('config_files')->nullable()->after('docker_image');
$table->foreign('config_from')->references('id')->on('service_options');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::table('service_options', function (Blueprint $table) {
$table->dropForeign(['config_from']);
$table->dropColumn('config_from');
$table->dropColumn('config_stop');
$table->dropColumn('config_logs');
$table->dropColumn('config_startup');
$table->dropColumn('config_files');
$table->string('executable')->after('docker_image')->nullable();
});
}
}