Add port mappings for postgresql
Able to add init scripts fro postgresql
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('standalone_postgresqls', function (Blueprint $table) {
|
||||
$table->text('ports_mappings')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('standalone_postgresqls', function (Blueprint $table) {
|
||||
$table->dropColumn('ports_mappings');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -8,9 +8,6 @@ use Illuminate\Database\Seeder;
|
||||
|
||||
class StandalonePostgresqlSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
StandalonePostgresql::create([
|
||||
@@ -20,6 +17,13 @@ class StandalonePostgresqlSeeder extends Seeder
|
||||
'environment_id' => 1,
|
||||
'destination_id' => 1,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'init_scripts' => [
|
||||
[
|
||||
'index' => 0,
|
||||
'filename' => 'init_test_db.sql',
|
||||
'content' => 'CREATE DATABASE test;'
|
||||
]
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user