coolify/database/migrations/2023_11_24_080341_add_docker_compose_location.php

43 lines
1.6 KiB
PHP
Raw Normal View History

2023-11-24 15:48:23 +01:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('applications', function (Blueprint $table) {
2023-11-27 15:50:22 +01:00
$table->string('docker_compose_location')->nullable()->default('/docker-compose.yaml')->after('dockerfile_location');
$table->string('docker_compose_pr_location')->nullable()->default('/docker-compose.yaml')->after('docker_compose_location');
2023-11-27 15:50:22 +01:00
2023-11-24 15:48:23 +01:00
$table->longText('docker_compose')->nullable()->after('docker_compose_location');
2023-11-27 15:50:22 +01:00
$table->longText('docker_compose_pr')->nullable()->after('docker_compose_location');
2023-11-24 15:48:23 +01:00
$table->longText('docker_compose_raw')->nullable()->after('docker_compose');
2023-11-27 15:50:22 +01:00
$table->longText('docker_compose_pr_raw')->nullable()->after('docker_compose');
2023-11-24 15:48:23 +01:00
2023-11-27 15:50:22 +01:00
$table->text('docker_compose_domains')->nullable()->after('docker_compose_raw');
2023-11-24 15:48:23 +01:00
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('applications', function (Blueprint $table) {
$table->dropColumn('docker_compose_location');
2023-11-27 15:50:22 +01:00
$table->dropColumn('docker_compose_pr_location');
2023-11-24 15:48:23 +01:00
$table->dropColumn('docker_compose');
2023-11-27 15:50:22 +01:00
$table->dropColumn('docker_compose_pr');
2023-11-24 15:48:23 +01:00
$table->dropColumn('docker_compose_raw');
2023-11-27 15:50:22 +01:00
$table->dropColumn('docker_compose_pr_raw');
2023-11-24 15:48:23 +01:00
$table->dropColumn('docker_compose_domains');
});
}
};