Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

faet(migration): Add SSL fields to database tables

peaklabs-dev792b1b889fb1
diff --git a/database/migrations/2025_01_27_102616_add_ssl_fields_to_database_tables.php b/database/migrations/2025_01_27_102616_add_ssl_fields_to_database_tables.php
new file mode 100644
index 0000000000..361e2fd321
--- /dev/null
+++ b/database/migrations/2025_01_27_102616_add_ssl_fields_to_database_tables.php
@@ -0,0 +1,70 @@
+<?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()
+ {
+ Schema::table('standalone_postgresqls', function (Blueprint $table) {
+ $table->boolean('enable_ssl')->default(true);
+ $table->enum('ssl_mode', ['allow', 'prefer', 'require', 'verify-ca', 'verify-full'])->default('require');
+ });
+ Schema::table('standalone_mysqls', function (Blueprint $table) {
+ $table->boolean('enable_ssl')->default(true);
+ $table->enum('ssl_mode', ['PREFERRED', 'REQUIRED', 'VERIFY_CA', 'VERIFY_IDENTITY'])->default('REQUIRED');
+ });
+ Schema::table('standalone_mariadbs', function (Blueprint $table) {
+ $table->boolean('enable_ssl')->default(true);
+ });
+ Schema::table('standalone_redis', function (Blueprint $table) {
+ $table->boolean('enable_ssl')->default(false);
+ });
+ Schema::table('standalone_keydbs', function (Blueprint $table) {
+ $table->boolean('enable_ssl')->default(false);
+ });
+ Schema::table('standalone_dragonflies', function (Blueprint $table) {
+ $table->boolean('enable_ssl')->default(false);
+ });
+ Schema::table('standalone_mongodbs', function (Blueprint $table) {
+ $table->boolean('enable_ssl')->default(true);
+ $table->enum('ssl_mode', ['allow', 'prefer', 'require', 'verify-full'])->default('require');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down()
+ {
+ Schema::table('standalone_postgresqls', function (Blueprint $table) {
+ $table->dropColumn('enable_ssl');
+ $table->dropColumn('ssl_mode');
+ });
+ Schema::table('standalone_mysqls', function (Blueprint $table) {
+ $table->dropColumn('enable_ssl');
+ $table->dropColumn('ssl_mode');
+ });
+ Schema::table('standalone_mariadbs', function (Blueprint $table) {
+ $table->dropColumn('enable_ssl');
+ });
+ Schema::table('standalone_redis', function (Blueprint $table) {
+ $table->dropColumn('enable_ssl');
+ });
+ Schema::table('standalone_keydbs', function (Blueprint $table) {
+ $table->dropColumn('enable_ssl');
+ });
+ Schema::table('standalone_dragonflies', function (Blueprint $table) {
+ $table->dropColumn('enable_ssl');
+ });
+ Schema::table('standalone_mongodbs', function (Blueprint $table) {
+ $table->dropColumn('enable_ssl');
+ $table->dropColumn('ssl_mode');
+ });
+ }
+};
diff --git a/database/migrations/2025_01_27_102616_add_ssl_fields_to_standalone_postgresqls.php b/database/migrations/2025_01_27_102616_add_ssl_fields_to_standalone_postgresqls.php
deleted file mode 100644
index 3b0ce8aa48..0000000000
--- a/database/migrations/2025_01_27_102616_add_ssl_fields_to_standalone_postgresqls.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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()
- {
- Schema::table('standalone_postgresqls', function (Blueprint $table) {
- $table->boolean('enable_ssl')->default(true);
- $table->string('ssl_mode')->nullable()->default('require');
- });
- }
-
- /**
- * Reverse the migrations.
- */
- public function down()
- {
- Schema::table('standalone_postgresqls', function (Blueprint $table) {
- $table->dropColumn('enable_ssl');
- $table->dropColumn('ssl_mode');
- });
- }
-};