feat: mysql, mariadb
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?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::create('standalone_mysqls', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
|
||||
$table->text('mysql_root_password');
|
||||
$table->string('mysql_user')->default('mysql');
|
||||
$table->text('mysql_password');
|
||||
$table->string('mysql_database')->default('default');
|
||||
$table->longText('mysql_conf')->nullable();
|
||||
|
||||
$table->string('status')->default('exited');
|
||||
|
||||
$table->string('image')->default('mysql:8');
|
||||
$table->boolean('is_public')->default(false);
|
||||
$table->integer('public_port')->nullable();
|
||||
$table->text('ports_mappings')->nullable();
|
||||
|
||||
$table->string('limits_memory')->default("0");
|
||||
$table->string('limits_memory_swap')->default("0");
|
||||
$table->integer('limits_memory_swappiness')->default(60);
|
||||
$table->string('limits_memory_reservation')->default("0");
|
||||
|
||||
$table->string('limits_cpus')->default("0");
|
||||
$table->string('limits_cpuset')->nullable()->default("0");
|
||||
$table->integer('limits_cpu_shares')->default(1024);
|
||||
|
||||
$table->timestamp('started_at')->nullable();
|
||||
$table->morphs('destination');
|
||||
|
||||
$table->foreignId('environment_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('standalone_mysqls');
|
||||
}
|
||||
};
|
@@ -0,0 +1,57 @@
|
||||
<?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::create('standalone_mariadbs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
|
||||
$table->text('mariadb_root_password');
|
||||
$table->string('mariadb_user')->default('mariadb');
|
||||
$table->text('mariadb_password');
|
||||
$table->string('mariadb_database')->default('default');
|
||||
$table->longText('mariadb_conf')->nullable();
|
||||
|
||||
$table->string('status')->default('exited');
|
||||
|
||||
$table->string('image')->default('mariadb:11');
|
||||
$table->boolean('is_public')->default(false);
|
||||
$table->integer('public_port')->nullable();
|
||||
$table->text('ports_mappings')->nullable();
|
||||
|
||||
$table->string('limits_memory')->default("0");
|
||||
$table->string('limits_memory_swap')->default("0");
|
||||
$table->integer('limits_memory_swappiness')->default(60);
|
||||
$table->string('limits_memory_reservation')->default("0");
|
||||
|
||||
$table->string('limits_cpus')->default("0");
|
||||
$table->string('limits_cpuset')->nullable()->default("0");
|
||||
$table->integer('limits_cpu_shares')->default(1024);
|
||||
|
||||
$table->timestamp('started_at')->nullable();
|
||||
$table->morphs('destination');
|
||||
|
||||
$table->foreignId('environment_id')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('standalone_mariadbs');
|
||||
}
|
||||
};
|
@@ -0,0 +1,30 @@
|
||||
<?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('environment_variables', function (Blueprint $table) {
|
||||
$table->foreignId('standalone_mysql_id')->nullable();
|
||||
$table->foreignId('standalone_mariadb_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('environment_variables', function (Blueprint $table) {
|
||||
$table->dropColumn('standalone_mysql_id');
|
||||
$table->dropColumn('standalone_mariadb_id');
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user