diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php new file mode 100644 index 00000000..87edb9d3 --- /dev/null +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -0,0 +1,29 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->string('password'); + $table->rememberToken(); + $table->string('profile_photo_path', 2048)->nullable(); + $table->text('two_factor_secret')->nullable(); + $table->text('two_factor_recovery_codes')->nullable(); + $table->string('timezone')->default('UTC')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('users'); + } +} diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 00000000..e4e4106d --- /dev/null +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,22 @@ +string('email')->index(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + } + + public function down(): void + { + Schema::dropIfExists('password_reset_tokens'); + } +} diff --git a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php new file mode 100644 index 00000000..700a83f0 --- /dev/null +++ b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php @@ -0,0 +1,70 @@ +getConnection()); + + $schema->create('telescope_entries', function (Blueprint $table) { + $table->bigIncrements('sequence'); + $table->uuid('uuid'); + $table->uuid('batch_id'); + $table->string('family_hash')->nullable(); + $table->boolean('should_display_on_index')->default(true); + $table->string('type', 20); + $table->longText('content'); + $table->dateTime('created_at')->nullable(); + + $table->unique('uuid'); + $table->index('batch_id'); + $table->index('family_hash'); + $table->index('created_at'); + $table->index(['type', 'should_display_on_index']); + }); + + $schema->create('telescope_entries_tags', function (Blueprint $table) { + $table->uuid('entry_uuid'); + $table->string('tag'); + + $table->primary(['entry_uuid', 'tag']); + $table->index('tag'); + + $table->foreign('entry_uuid') + ->references('uuid') + ->on('telescope_entries') + ->onDelete('cascade'); + }); + + $schema->create('telescope_monitoring', function (Blueprint $table) { + $table->string('tag')->primary(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + $schema = Schema::connection($this->getConnection()); + + $schema->dropIfExists('telescope_entries_tags'); + $schema->dropIfExists('telescope_entries'); + $schema->dropIfExists('telescope_monitoring'); + } +}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php new file mode 100644 index 00000000..85264d8b --- /dev/null +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -0,0 +1,26 @@ +id(); + $table->string('uuid')->unique(); + $table->text('connection'); + $table->text('queue'); + $table->longText('payload'); + $table->longText('exception'); + $table->timestamp('failed_at')->useCurrent(); + }); + } + + public function down(): void + { + Schema::dropIfExists('failed_jobs'); + } +}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php new file mode 100644 index 00000000..b30c3235 --- /dev/null +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -0,0 +1,27 @@ +id(); + $table->morphs('tokenable'); + $table->string('name'); + $table->string('token', 64)->unique(); + $table->text('abilities')->nullable(); + $table->timestamp('last_used_at')->nullable(); + $table->timestamp('expires_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('personal_access_tokens'); + } +}; diff --git a/database/migrations/2021_06_23_192743_create_sessions_table.php b/database/migrations/2021_06_23_192743_create_sessions_table.php new file mode 100644 index 00000000..2d0c2885 --- /dev/null +++ b/database/migrations/2021_06_23_192743_create_sessions_table.php @@ -0,0 +1,25 @@ +string('id')->primary(); + $table->foreignId('user_id')->nullable()->index(); + $table->string('ip_address', 45)->nullable(); + $table->text('user_agent')->nullable(); + $table->text('payload'); + $table->integer('last_activity')->index(); + }); + } + + public function down(): void + { + Schema::dropIfExists('sessions'); + } +}; diff --git a/database/migrations/2021_06_23_211827_create_servers_table.php b/database/migrations/2021_06_23_211827_create_servers_table.php new file mode 100644 index 00000000..3333b10c --- /dev/null +++ b/database/migrations/2021_06_23_211827_create_servers_table.php @@ -0,0 +1,38 @@ +id(); + $table->unsignedBigInteger('user_id'); + $table->string('name')->index(); + $table->string('ssh_user')->nullable(); + $table->ipAddress('ip')->index()->nullable(); + $table->ipAddress('local_ip')->nullable(); + $table->unsignedInteger('provider_id')->nullable(); + $table->integer('port')->default(22); + $table->string('os'); + $table->string('type'); + $table->json('type_data')->nullable(); + $table->string('provider'); + $table->json('provider_data')->nullable(); + $table->longText('authentication')->nullable(); + $table->longText('public_key')->nullable(); + $table->string('status')->default('installing'); + $table->integer('progress')->default(0); + $table->string('progress_step')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('servers'); + } +}; diff --git a/database/migrations/2021_06_23_214143_create_services_table.php b/database/migrations/2021_06_23_214143_create_services_table.php new file mode 100644 index 00000000..1ff1cc49 --- /dev/null +++ b/database/migrations/2021_06_23_214143_create_services_table.php @@ -0,0 +1,30 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->string('type'); + $table->json('type_data')->nullable(); + $table->string('name'); + $table->string('version'); + $table->string('status')->default(ServiceStatus::INSTALLING); + $table->boolean('is_default')->default(1); + $table->string('unit')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('services'); + } +}; diff --git a/database/migrations/2021_06_25_102220_create_jobs_table.php b/database/migrations/2021_06_25_102220_create_jobs_table.php new file mode 100644 index 00000000..bb1daa2a --- /dev/null +++ b/database/migrations/2021_06_25_102220_create_jobs_table.php @@ -0,0 +1,26 @@ +bigIncrements('id'); + $table->string('queue')->index(); + $table->longText('payload'); + $table->integer('attempts'); + $table->integer('reserved_at')->nullable(); + $table->integer('available_at'); + $table->integer('created_at'); + }); + } + + public function down(): void + { + Schema::dropIfExists('jobs'); + } +}; diff --git a/database/migrations/2021_06_25_124831_create_server_logs_table.php b/database/migrations/2021_06_25_124831_create_server_logs_table.php new file mode 100644 index 00000000..e84db4e9 --- /dev/null +++ b/database/migrations/2021_06_25_124831_create_server_logs_table.php @@ -0,0 +1,26 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->unsignedBigInteger('site_id')->nullable(); + $table->string('type'); + $table->string('name'); + $table->string('disk'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('server_logs'); + } +}; diff --git a/database/migrations/2021_06_26_211903_create_sites_table.php b/database/migrations/2021_06_26_211903_create_sites_table.php new file mode 100644 index 00000000..b8c20b80 --- /dev/null +++ b/database/migrations/2021_06_26_211903_create_sites_table.php @@ -0,0 +1,35 @@ +id(); + $table->unsignedBigInteger('server_id')->index(); + $table->string('type'); + $table->json('type_data')->nullable(); + $table->string('domain')->index(); + $table->json('aliases')->nullable(); + $table->string('web_directory')->nullable(); + $table->string('path'); + $table->string('php_version')->nullable(); + $table->string('source_control')->nullable(); + $table->string('repository')->nullable(); + $table->string('branch')->nullable(); + $table->integer('port')->nullable(); + $table->string('status')->default('installing'); + $table->integer('progress')->default(0)->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('sites'); + } +}; diff --git a/database/migrations/2021_06_28_085814_create_source_controls_table.php b/database/migrations/2021_06_28_085814_create_source_controls_table.php new file mode 100644 index 00000000..086675b5 --- /dev/null +++ b/database/migrations/2021_06_28_085814_create_source_controls_table.php @@ -0,0 +1,24 @@ +id(); + $table->string('provider'); + $table->json('provider_data')->nullable(); + $table->longText('access_token')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('source_controls'); + } +}; diff --git a/database/migrations/2021_07_02_065815_create_deployments_table.php b/database/migrations/2021_07_02_065815_create_deployments_table.php new file mode 100644 index 00000000..e93c6018 --- /dev/null +++ b/database/migrations/2021_07_02_065815_create_deployments_table.php @@ -0,0 +1,27 @@ +id(); + $table->unsignedBigInteger('site_id'); + $table->unsignedBigInteger('deployment_script_id'); + $table->unsignedInteger('log_id')->nullable(); + $table->json('commit_data')->nullable(); + $table->string('commit_id')->nullable(); + $table->string('status'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('deployments'); + } +}; diff --git a/database/migrations/2021_07_03_133319_create_databases_table.php b/database/migrations/2021_07_03_133319_create_databases_table.php new file mode 100644 index 00000000..0d9cebb2 --- /dev/null +++ b/database/migrations/2021_07_03_133319_create_databases_table.php @@ -0,0 +1,25 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->string('name'); + $table->string('status')->default(DatabaseStatus::CREATING); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('databases'); + } +}; diff --git a/database/migrations/2021_07_03_133327_create_database_users_table.php b/database/migrations/2021_07_03_133327_create_database_users_table.php new file mode 100644 index 00000000..f67aa09d --- /dev/null +++ b/database/migrations/2021_07_03_133327_create_database_users_table.php @@ -0,0 +1,28 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->string('username'); + $table->longText('password')->nullable(); + $table->json('databases')->nullable(); + $table->string('host')->default('localhost'); + $table->string('status')->default(DatabaseUserStatus::CREATING); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('database_users'); + } +}; diff --git a/database/migrations/2021_07_15_090830_create_firewall_rules_table.php b/database/migrations/2021_07_15_090830_create_firewall_rules_table.php new file mode 100644 index 00000000..92020a8d --- /dev/null +++ b/database/migrations/2021_07_15_090830_create_firewall_rules_table.php @@ -0,0 +1,29 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->string('type'); + $table->string('protocol'); + $table->integer('port'); + $table->ipAddress('source')->default('0.0.0.0'); + $table->string('mask')->nullable(); + $table->text('note')->nullable(); + $table->string('status')->default('creating'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('firewall_rules'); + } +}; diff --git a/database/migrations/2021_07_30_204454_create_cron_jobs_table.php b/database/migrations/2021_07_30_204454_create_cron_jobs_table.php new file mode 100644 index 00000000..c62848b0 --- /dev/null +++ b/database/migrations/2021_07_30_204454_create_cron_jobs_table.php @@ -0,0 +1,27 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->text('command'); + $table->string('user'); + $table->string('frequency'); + $table->boolean('hidden')->default(0); + $table->string('status'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('cron_jobs'); + } +}; diff --git a/database/migrations/2021_08_13_213657_create_deployment_scripts_table.php b/database/migrations/2021_08_13_213657_create_deployment_scripts_table.php new file mode 100644 index 00000000..cbc401f2 --- /dev/null +++ b/database/migrations/2021_08_13_213657_create_deployment_scripts_table.php @@ -0,0 +1,24 @@ +id(); + $table->unsignedBigInteger('site_id'); + $table->string('name')->nullable(); + $table->longText('content')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('deployment_scripts'); + } +}; diff --git a/database/migrations/2021_08_14_165326_create_ssls_table.php b/database/migrations/2021_08_14_165326_create_ssls_table.php new file mode 100644 index 00000000..b85bcbff --- /dev/null +++ b/database/migrations/2021_08_14_165326_create_ssls_table.php @@ -0,0 +1,29 @@ +id(); + $table->unsignedBigInteger('site_id'); + $table->string('type')->default('letsencrypt'); + $table->string('domains')->nullable(); + $table->longText('certificate')->nullable(); + $table->longText('pk')->nullable(); + $table->longText('ca')->nullable(); + $table->timestamp('expires_at'); + $table->string('status'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('ssls'); + } +}; diff --git a/database/migrations/2021_08_26_055643_create_redirects_table.php b/database/migrations/2021_08_26_055643_create_redirects_table.php new file mode 100644 index 00000000..39241664 --- /dev/null +++ b/database/migrations/2021_08_26_055643_create_redirects_table.php @@ -0,0 +1,26 @@ +id(); + $table->unsignedBigInteger('site_id'); + $table->integer('mode'); + $table->text('from'); + $table->text('to'); + $table->string('status')->default('creating'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('redirects'); + } +}; diff --git a/database/migrations/2021_08_27_064512_create_queues_table.php b/database/migrations/2021_08_27_064512_create_queues_table.php new file mode 100644 index 00000000..23b94572 --- /dev/null +++ b/database/migrations/2021_08_27_064512_create_queues_table.php @@ -0,0 +1,31 @@ +id(); + $table->unsignedInteger('server_id')->nullable(); + $table->unsignedBigInteger('site_id'); + $table->text('command'); + $table->string('user'); + $table->boolean('auto_start')->default(1); + $table->boolean('auto_restart')->default(1); + $table->integer('numprocs')->default(8); + $table->boolean('redirect_stderr')->default(1); + $table->string('stdout_logfile')->nullable(); + $table->string('status'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('queues'); + } +}; diff --git a/database/migrations/2021_08_29_210204_create_ssh_keys_table.php b/database/migrations/2021_08_29_210204_create_ssh_keys_table.php new file mode 100644 index 00000000..0d168826 --- /dev/null +++ b/database/migrations/2021_08_29_210204_create_ssh_keys_table.php @@ -0,0 +1,24 @@ +id(); + $table->unsignedBigInteger('user_id'); + $table->string('name'); + $table->longText('public_key'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('ssh_keys'); + } +}; diff --git a/database/migrations/2021_08_30_174511_create_server_ssh_keys_table.php b/database/migrations/2021_08_30_174511_create_server_ssh_keys_table.php new file mode 100644 index 00000000..b093179e --- /dev/null +++ b/database/migrations/2021_08_30_174511_create_server_ssh_keys_table.php @@ -0,0 +1,24 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->unsignedBigInteger('ssh_key_id'); + $table->string('status'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('server_ssh_keys'); + } +}; diff --git a/database/migrations/2021_11_12_093030_create_git_hooks_table.php b/database/migrations/2021_11_12_093030_create_git_hooks_table.php new file mode 100644 index 00000000..d0f59c21 --- /dev/null +++ b/database/migrations/2021_11_12_093030_create_git_hooks_table.php @@ -0,0 +1,28 @@ +id(); + $table->unsignedBigInteger('site_id'); + $table->unsignedBigInteger('source_control_id'); + $table->string('secret')->unique()->index(); + $table->json('events'); + $table->json('actions'); + $table->string('hook_id')->nullable(); + $table->json('hook_response')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('git_hooks'); + } +}; diff --git a/database/migrations/2021_11_14_190808_create_server_providers_table.php b/database/migrations/2021_11_14_190808_create_server_providers_table.php new file mode 100644 index 00000000..a85cad82 --- /dev/null +++ b/database/migrations/2021_11_14_190808_create_server_providers_table.php @@ -0,0 +1,26 @@ +id(); + $table->unsignedBigInteger('user_id'); + $table->string('profile')->nullable(); + $table->string('provider'); + $table->longText('credentials'); + $table->boolean('connected')->default(1); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('server_providers'); + } +}; diff --git a/database/migrations/2021_12_09_062430_create_scripts_table.php b/database/migrations/2021_12_09_062430_create_scripts_table.php new file mode 100644 index 00000000..eb97ed65 --- /dev/null +++ b/database/migrations/2021_12_09_062430_create_scripts_table.php @@ -0,0 +1,24 @@ +id(); + $table->unsignedBigInteger('user_id'); + $table->string('name'); + $table->longText('content'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('scripts'); + } +}; diff --git a/database/migrations/2021_12_10_204458_create_script_executions_table.php b/database/migrations/2021_12_10_204458_create_script_executions_table.php new file mode 100644 index 00000000..7d1f78a2 --- /dev/null +++ b/database/migrations/2021_12_10_204458_create_script_executions_table.php @@ -0,0 +1,25 @@ +id(); + $table->unsignedBigInteger('script_id'); + $table->unsignedBigInteger('server_id'); + $table->string('user')->nullable(); + $table->timestamp('finished_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('script_executions'); + } +}; diff --git a/database/migrations/2021_12_24_151835_create_notification_channels_table.php b/database/migrations/2021_12_24_151835_create_notification_channels_table.php new file mode 100644 index 00000000..7b85db2a --- /dev/null +++ b/database/migrations/2021_12_24_151835_create_notification_channels_table.php @@ -0,0 +1,26 @@ +id(); + $table->string('provider'); + $table->string('label'); + $table->json('data')->nullable(); + $table->boolean('connected')->default(false); + $table->boolean('is_default')->default(false); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('notification_channels'); + } +}; diff --git a/database/migrations/2022_01_29_183900_create_storage_providers_table.php b/database/migrations/2022_01_29_183900_create_storage_providers_table.php new file mode 100644 index 00000000..b64e8560 --- /dev/null +++ b/database/migrations/2022_01_29_183900_create_storage_providers_table.php @@ -0,0 +1,27 @@ +id(); + $table->string('provider'); + $table->string('label')->nullable(); + $table->string('token', 1000)->nullable(); + $table->string('refresh_token', 1000)->nullable(); + $table->boolean('connected')->default(1); + $table->timestamp('token_expires_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('storage_providers'); + } +} diff --git a/database/migrations/2022_02_11_085718_create_backups_table.php b/database/migrations/2022_02_11_085718_create_backups_table.php new file mode 100644 index 00000000..c84fa57d --- /dev/null +++ b/database/migrations/2022_02_11_085718_create_backups_table.php @@ -0,0 +1,29 @@ +id(); + $table->string('type'); + $table->string('name'); + $table->unsignedBigInteger('server_id'); + $table->unsignedBigInteger('storage_id'); + $table->unsignedBigInteger('database_id')->nullable(); + $table->string('interval'); + $table->bigInteger('keep_backups'); + $table->string('status'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('backups'); + } +}; diff --git a/database/migrations/2022_02_11_085815_create_backup_files_table.php b/database/migrations/2022_02_11_085815_create_backup_files_table.php new file mode 100644 index 00000000..f08007d2 --- /dev/null +++ b/database/migrations/2022_02_11_085815_create_backup_files_table.php @@ -0,0 +1,26 @@ +id(); + $table->unsignedInteger('backup_id'); + $table->string('name'); + $table->bigInteger('size')->nullable(); + $table->string('status'); + $table->timestamp('restored_at')->nullable(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('backup_files'); + } +}; diff --git a/database/migrations/2023_07_21_210213_update_firewall_rules_table.php b/database/migrations/2023_07_21_210213_update_firewall_rules_table.php new file mode 100644 index 00000000..2e31c437 --- /dev/null +++ b/database/migrations/2023_07_21_210213_update_firewall_rules_table.php @@ -0,0 +1,19 @@ +longText('ssh_key')->nullable()->after('repository'); + }); + } + + public function down(): void + { + Schema::table('sites', function (Blueprint $table) { + $table->dropColumn('ssh_key'); + }); + } +}; diff --git a/database/migrations/2023_07_30_163805_add_url_to_source_controls_table.php b/database/migrations/2023_07_30_163805_add_url_to_source_controls_table.php new file mode 100644 index 00000000..50e262f0 --- /dev/null +++ b/database/migrations/2023_07_30_163805_add_url_to_source_controls_table.php @@ -0,0 +1,22 @@ +string('url')->nullable()->after('provider'); + }); + } + + public function down(): void + { + Schema::table('source_controls', function (Blueprint $table) { + $table->dropColumn('url'); + }); + } +}; diff --git a/database/migrations/2023_07_30_200348_add_profile_to_source_controls_table.php b/database/migrations/2023_07_30_200348_add_profile_to_source_controls_table.php new file mode 100644 index 00000000..fb7c873b --- /dev/null +++ b/database/migrations/2023_07_30_200348_add_profile_to_source_controls_table.php @@ -0,0 +1,22 @@ +string('profile')->after('provider')->nullable(); + }); + } + + public function down(): void + { + Schema::table('source_controls', function (Blueprint $table) { + $table->dropColumn('profile'); + }); + } +}; diff --git a/database/migrations/2023_07_30_205328_add_source_control_id_to_sites_table.php b/database/migrations/2023_07_30_205328_add_source_control_id_to_sites_table.php new file mode 100644 index 00000000..cfdcd235 --- /dev/null +++ b/database/migrations/2023_07_30_205328_add_source_control_id_to_sites_table.php @@ -0,0 +1,22 @@ +unsignedBigInteger('source_control_id')->nullable()->after('source_control'); + }); + } + + public function down(): void + { + Schema::table('sites', function (Blueprint $table) { + $table->dropColumn('source_control_id'); + }); + } +}; diff --git a/database/migrations/2023_08_13_095440_update_storage_providers_table.php b/database/migrations/2023_08_13_095440_update_storage_providers_table.php new file mode 100644 index 00000000..b5dc1ff5 --- /dev/null +++ b/database/migrations/2023_08_13_095440_update_storage_providers_table.php @@ -0,0 +1,33 @@ +unsignedBigInteger('user_id')->after('id'); + $table->string('profile')->after('user_id'); + $table->longText('credentials')->nullable()->after('provider'); + }); + Schema::table('storage_providers', function (Blueprint $table) { + $table->dropColumn(['token', 'refresh_token', 'token_expires_at', 'label', 'connected']); + }); + } + + public function down(): void + { + Schema::table('storage_providers', function (Blueprint $table) { + $table->string('token')->nullable(); + $table->string('refresh_token')->nullable(); + $table->string('token_expires_at')->nullable(); + $table->string('label')->nullable(); + }); + Schema::table('storage_providers', function (Blueprint $table) { + $table->dropColumn(['user_id', 'profile', 'credentials']); + }); + } +}; diff --git a/database/migrations/2023_08_17_231824_update_backups_table.php b/database/migrations/2023_08_17_231824_update_backups_table.php new file mode 100644 index 00000000..4103c1d8 --- /dev/null +++ b/database/migrations/2023_08_17_231824_update_backups_table.php @@ -0,0 +1,22 @@ +dropColumn('name'); + }); + } + + public function down(): void + { + Schema::table('backups', function (Blueprint $table) { + $table->string('name')->nullable(); + }); + } +}; diff --git a/database/migrations/2023_08_25_183201_update_backup_files_table.php b/database/migrations/2023_08_25_183201_update_backup_files_table.php new file mode 100644 index 00000000..a3b3a034 --- /dev/null +++ b/database/migrations/2023_08_25_183201_update_backup_files_table.php @@ -0,0 +1,22 @@ +string('restored_to')->after('status')->nullable(); + }); + } + + public function down(): void + { + Schema::table('backup_files', function (Blueprint $table) { + $table->dropColumn('restored_to'); + }); + } +}; diff --git a/database/migrations/2023_09_10_185414_add_two_factor_fields_to_users_table.php b/database/migrations/2023_09_10_185414_add_two_factor_fields_to_users_table.php new file mode 100644 index 00000000..024ad278 --- /dev/null +++ b/database/migrations/2023_09_10_185414_add_two_factor_fields_to_users_table.php @@ -0,0 +1,32 @@ +timestamp('two_factor_confirmed_at') + ->after('two_factor_recovery_codes') + ->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn([ + 'two_factor_confirmed_at', + ]); + }); + } +}; diff --git a/database/migrations/2023_10_01_120250_create_projects_table.php b/database/migrations/2023_10_01_120250_create_projects_table.php new file mode 100644 index 00000000..26113731 --- /dev/null +++ b/database/migrations/2023_10_01_120250_create_projects_table.php @@ -0,0 +1,23 @@ +id(); + $table->bigInteger('user_id'); + $table->string('name'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('projects'); + } +}; diff --git a/database/migrations/2024_01_01_232932_update_servers_table.php b/database/migrations/2024_01_01_232932_update_servers_table.php new file mode 100644 index 00000000..7a666af3 --- /dev/null +++ b/database/migrations/2024_01_01_232932_update_servers_table.php @@ -0,0 +1,22 @@ +unsignedBigInteger('project_id')->nullable()->after('id'); + }); + } + + public function down(): void + { + Schema::table('servers', function (Blueprint $table) { + $table->dropColumn('project_id'); + }); + } +}; diff --git a/database/migrations/2024_01_01_235900_update_users_table.php b/database/migrations/2024_01_01_235900_update_users_table.php new file mode 100644 index 00000000..e9669819 --- /dev/null +++ b/database/migrations/2024_01_01_235900_update_users_table.php @@ -0,0 +1,27 @@ +unsignedBigInteger('current_project_id')->nullable()->after('timezone'); + }); + User::query()->each(function (User $user) { + $project = $user->createDefaultProject(); + $user->servers()->update(['project_id' => $project->id]); + }); + } + + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('current_project_id'); + }); + } +}; diff --git a/database/migrations/2024_04_07_204001_add_is_remote_to_server_logs_table.php b/database/migrations/2024_04_07_204001_add_is_remote_to_server_logs_table.php new file mode 100644 index 00000000..1e8e165a --- /dev/null +++ b/database/migrations/2024_04_07_204001_add_is_remote_to_server_logs_table.php @@ -0,0 +1,28 @@ +boolean('is_remote')->default(false); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('server_logs', function (Blueprint $table) { + $table->dropColumn('is_remote'); + }); + } +}; diff --git a/database/migrations/2024_04_08_212940_create_metrics_table.php b/database/migrations/2024_04_08_212940_create_metrics_table.php new file mode 100644 index 00000000..ab8ab062 --- /dev/null +++ b/database/migrations/2024_04_08_212940_create_metrics_table.php @@ -0,0 +1,37 @@ +id(); + $table->unsignedBigInteger('server_id'); + $table->decimal('load', 5, 2); + $table->decimal('memory_total', 15, 0); + $table->decimal('memory_used', 15, 0); + $table->decimal('memory_free', 15, 0); + $table->decimal('disk_total', 15, 0); + $table->decimal('disk_used', 15, 0); + $table->decimal('disk_free', 15, 0); + $table->timestamps(); + + $table->index(['server_id', 'created_at']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('metrics'); + } +}; diff --git a/database/migrations/2024_04_24_213204_add_role_to_users_table.php b/database/migrations/2024_04_24_213204_add_role_to_users_table.php new file mode 100644 index 00000000..2fdde00c --- /dev/null +++ b/database/migrations/2024_04_24_213204_add_role_to_users_table.php @@ -0,0 +1,31 @@ +string('role')->default(UserRole::USER); + }); + User::query()->update(['role' => UserRole::ADMIN]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('role'); + }); + } +}; diff --git a/database/migrations/2024_04_26_122230_create_user_project_table.php b/database/migrations/2024_04_26_122230_create_user_project_table.php new file mode 100644 index 00000000..60820d98 --- /dev/null +++ b/database/migrations/2024_04_26_122230_create_user_project_table.php @@ -0,0 +1,38 @@ +id(); + $table->unsignedBigInteger('user_id'); + $table->unsignedBigInteger('project_id'); + $table->timestamps(); + }); + Project::all()->each(function (Project $project) { + $project->users()->attach($project->user_id); + }); + User::all()->each(function (User $user) { + $user->current_project_id = $user->projects()->first()?->id; + $user->save(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('user_project'); + } +}; diff --git a/database/migrations/2024_04_26_123326_drop_user_id_from_projects_table.php b/database/migrations/2024_04_26_123326_drop_user_id_from_projects_table.php new file mode 100644 index 00000000..5c6c1730 --- /dev/null +++ b/database/migrations/2024_04_26_123326_drop_user_id_from_projects_table.php @@ -0,0 +1,28 @@ +dropColumn('user_id'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('projects', function (Blueprint $table) { + $table->bigInteger('user_id')->nullable(); + }); + } +}; diff --git a/database/migrations/2024_05_07_184201_add_project_id_to_source_controls_table.php b/database/migrations/2024_05_07_184201_add_project_id_to_source_controls_table.php new file mode 100644 index 00000000..58fbaabd --- /dev/null +++ b/database/migrations/2024_05_07_184201_add_project_id_to_source_controls_table.php @@ -0,0 +1,28 @@ +unsignedBigInteger('project_id')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('source_controls', function (Blueprint $table) { + $table->dropColumn('project_id'); + }); + } +}; diff --git a/database/migrations/2024_05_10_212155_add_updates_field_to_servers_table.php b/database/migrations/2024_05_10_212155_add_updates_field_to_servers_table.php new file mode 100644 index 00000000..aa0c95a8 --- /dev/null +++ b/database/migrations/2024_05_10_212155_add_updates_field_to_servers_table.php @@ -0,0 +1,24 @@ +integer('updates')->default(0); + $table->timestamp('last_update_check')->nullable(); + }); + } + + public function down(): void + { + Schema::table('servers', function (Blueprint $table) { + $table->dropColumn('updates'); + $table->dropColumn('last_update_check'); + }); + } +}; diff --git a/database/migrations/2024_06_06_093350_create_script_executions_table.php b/database/migrations/2024_06_06_093350_create_script_executions_table.php new file mode 100644 index 00000000..01ddcbef --- /dev/null +++ b/database/migrations/2024_06_06_093350_create_script_executions_table.php @@ -0,0 +1,28 @@ +id(); + $table->unsignedBigInteger('script_id'); + $table->unsignedBigInteger('server_log_id')->nullable(); + $table->string('user'); + $table->json('variables')->nullable(); + $table->string('status'); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('script_executions'); + } +}; diff --git a/database/schema/sqlite-schema.sql b/database/schema/sqlite-schema.sql deleted file mode 100644 index 0dba5377..00000000 --- a/database/schema/sqlite-schema.sql +++ /dev/null @@ -1,108 +0,0 @@ -CREATE TABLE IF NOT EXISTS "migrations" ("id" integer primary key autoincrement not null, "migration" varchar not null, "batch" integer not null); -CREATE TABLE IF NOT EXISTS "users" ("id" integer primary key autoincrement not null, "name" varchar not null, "email" varchar not null, "password" varchar not null, "remember_token" varchar, "profile_photo_path" varchar, "two_factor_secret" text, "two_factor_recovery_codes" text, "timezone" varchar default 'UTC', "created_at" datetime, "updated_at" datetime, "two_factor_confirmed_at" datetime, "current_project_id" integer, "role" varchar not null default 'user'); -CREATE UNIQUE INDEX "users_email_unique" on "users" ("email"); -CREATE TABLE IF NOT EXISTS "password_reset_tokens" ("email" varchar not null, "token" varchar not null, "created_at" datetime); -CREATE INDEX "password_reset_tokens_email_index" on "password_reset_tokens" ("email"); -CREATE TABLE IF NOT EXISTS "telescope_entries" ("sequence" integer primary key autoincrement not null, "uuid" varchar not null, "batch_id" varchar not null, "family_hash" varchar, "should_display_on_index" tinyint(1) not null default '1', "type" varchar not null, "content" text not null, "created_at" datetime); -CREATE UNIQUE INDEX "telescope_entries_uuid_unique" on "telescope_entries" ("uuid"); -CREATE INDEX "telescope_entries_batch_id_index" on "telescope_entries" ("batch_id"); -CREATE INDEX "telescope_entries_family_hash_index" on "telescope_entries" ("family_hash"); -CREATE INDEX "telescope_entries_created_at_index" on "telescope_entries" ("created_at"); -CREATE INDEX "telescope_entries_type_should_display_on_index_index" on "telescope_entries" ("type", "should_display_on_index"); -CREATE TABLE IF NOT EXISTS "telescope_entries_tags" ("entry_uuid" varchar not null, "tag" varchar not null, foreign key("entry_uuid") references "telescope_entries"("uuid") on delete cascade, primary key ("entry_uuid", "tag")); -CREATE INDEX "telescope_entries_tags_tag_index" on "telescope_entries_tags" ("tag"); -CREATE TABLE IF NOT EXISTS "telescope_monitoring" ("tag" varchar not null, primary key ("tag")); -CREATE TABLE IF NOT EXISTS "failed_jobs" ("id" integer primary key autoincrement not null, "uuid" varchar not null, "connection" text not null, "queue" text not null, "payload" text not null, "exception" text not null, "failed_at" datetime not null default CURRENT_TIMESTAMP); -CREATE UNIQUE INDEX "failed_jobs_uuid_unique" on "failed_jobs" ("uuid"); -CREATE TABLE IF NOT EXISTS "personal_access_tokens" ("id" integer primary key autoincrement not null, "tokenable_type" varchar not null, "tokenable_id" integer not null, "name" varchar not null, "token" varchar not null, "abilities" text, "last_used_at" datetime, "expires_at" datetime, "created_at" datetime, "updated_at" datetime); -CREATE INDEX "personal_access_tokens_tokenable_type_tokenable_id_index" on "personal_access_tokens" ("tokenable_type", "tokenable_id"); -CREATE UNIQUE INDEX "personal_access_tokens_token_unique" on "personal_access_tokens" ("token"); -CREATE TABLE IF NOT EXISTS "sessions" ("id" varchar not null, "user_id" integer, "ip_address" varchar, "user_agent" text, "payload" text not null, "last_activity" integer not null, primary key ("id")); -CREATE INDEX "sessions_user_id_index" on "sessions" ("user_id"); -CREATE INDEX "sessions_last_activity_index" on "sessions" ("last_activity"); -CREATE TABLE IF NOT EXISTS "servers" ("id" integer primary key autoincrement not null, "user_id" integer not null, "name" varchar not null, "ssh_user" varchar, "ip" varchar, "local_ip" varchar, "provider_id" integer, "port" integer not null default '22', "os" varchar not null, "type" varchar not null, "type_data" text, "provider" varchar not null, "provider_data" text, "authentication" text, "public_key" text, "status" varchar not null default 'installing', "progress" integer not null default '0', "progress_step" varchar, "created_at" datetime, "updated_at" datetime, "project_id" integer, "updates" integer not null default '0', "last_update_check" datetime); -CREATE INDEX "servers_name_index" on "servers" ("name"); -CREATE INDEX "servers_ip_index" on "servers" ("ip"); -CREATE TABLE IF NOT EXISTS "services" ("id" integer primary key autoincrement not null, "server_id" integer not null, "type" varchar not null, "type_data" text, "name" varchar not null, "version" varchar not null, "status" varchar not null default 'installing', "is_default" tinyint(1) not null default '1', "unit" varchar, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "jobs" ("id" integer primary key autoincrement not null, "queue" varchar not null, "payload" text not null, "attempts" integer not null, "reserved_at" integer, "available_at" integer not null, "created_at" integer not null); -CREATE INDEX "jobs_queue_index" on "jobs" ("queue"); -CREATE TABLE IF NOT EXISTS "server_logs" ("id" integer primary key autoincrement not null, "server_id" integer not null, "site_id" integer, "type" varchar not null, "name" varchar not null, "disk" varchar not null, "created_at" datetime, "updated_at" datetime, "is_remote" tinyint(1) not null default '0'); -CREATE TABLE IF NOT EXISTS "sites" ("id" integer primary key autoincrement not null, "server_id" integer not null, "type" varchar not null, "type_data" text, "domain" varchar not null, "aliases" text, "web_directory" varchar, "path" varchar not null, "php_version" varchar, "source_control" varchar, "repository" varchar, "branch" varchar, "port" integer, "status" varchar not null default 'installing', "progress" integer default '0', "created_at" datetime, "updated_at" datetime, "ssh_key" text, "source_control_id" integer); -CREATE INDEX "sites_server_id_index" on "sites" ("server_id"); -CREATE INDEX "sites_domain_index" on "sites" ("domain"); -CREATE TABLE IF NOT EXISTS "source_controls" ("id" integer primary key autoincrement not null, "provider" varchar not null, "provider_data" text, "access_token" text, "created_at" datetime, "updated_at" datetime, "url" varchar, "profile" varchar, "project_id" integer); -CREATE TABLE IF NOT EXISTS "deployments" ("id" integer primary key autoincrement not null, "site_id" integer not null, "deployment_script_id" integer not null, "log_id" integer, "commit_data" text, "commit_id" varchar, "status" varchar not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "databases" ("id" integer primary key autoincrement not null, "server_id" integer not null, "name" varchar not null, "status" varchar not null default 'creating', "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "database_users" ("id" integer primary key autoincrement not null, "server_id" integer not null, "username" varchar not null, "password" text, "databases" text, "host" varchar not null default 'localhost', "status" varchar not null default 'creating', "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "firewall_rules" ("id" integer primary key autoincrement not null, "server_id" integer not null, "type" varchar not null, "protocol" varchar not null, "port" integer not null, "source" varchar not null default '0.0.0.0', "mask" varchar, "note" text, "status" varchar not null default 'creating', "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "cron_jobs" ("id" integer primary key autoincrement not null, "server_id" integer not null, "command" text not null, "user" varchar not null, "frequency" varchar not null, "hidden" tinyint(1) not null default '0', "status" varchar not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "deployment_scripts" ("id" integer primary key autoincrement not null, "site_id" integer not null, "name" varchar, "content" text, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "ssls" ("id" integer primary key autoincrement not null, "site_id" integer not null, "type" varchar not null default 'letsencrypt', "domains" varchar, "certificate" text, "pk" text, "ca" text, "expires_at" datetime not null, "status" varchar not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "redirects" ("id" integer primary key autoincrement not null, "site_id" integer not null, "mode" integer not null, "from" text not null, "to" text not null, "status" varchar not null default 'creating', "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "queues" ("id" integer primary key autoincrement not null, "server_id" integer, "site_id" integer not null, "command" text not null, "user" varchar not null, "auto_start" tinyint(1) not null default '1', "auto_restart" tinyint(1) not null default '1', "numprocs" integer not null default '8', "redirect_stderr" tinyint(1) not null default '1', "stdout_logfile" varchar, "status" varchar not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "ssh_keys" ("id" integer primary key autoincrement not null, "user_id" integer not null, "name" varchar not null, "public_key" text not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "server_ssh_keys" ("id" integer primary key autoincrement not null, "server_id" integer not null, "ssh_key_id" integer not null, "status" varchar not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "git_hooks" ("id" integer primary key autoincrement not null, "site_id" integer not null, "source_control_id" integer not null, "secret" varchar not null, "events" text not null, "actions" text not null, "hook_id" varchar, "hook_response" text, "created_at" datetime, "updated_at" datetime); -CREATE UNIQUE INDEX "git_hooks_secret_unique" on "git_hooks" ("secret"); -CREATE TABLE IF NOT EXISTS "server_providers" ("id" integer primary key autoincrement not null, "user_id" integer not null, "profile" varchar, "provider" varchar not null, "credentials" text not null, "connected" tinyint(1) not null default '1', "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "scripts" ("id" integer primary key autoincrement not null, "user_id" integer not null, "name" varchar not null, "content" text not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "notification_channels" ("id" integer primary key autoincrement not null, "provider" varchar not null, "label" varchar not null, "data" text, "connected" tinyint(1) not null default '0', "is_default" tinyint(1) not null default '0', "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "storage_providers" ("id" integer primary key autoincrement not null, "provider" varchar not null, "created_at" datetime, "updated_at" datetime, "user_id" integer not null, "profile" varchar not null, "credentials" text); -CREATE TABLE IF NOT EXISTS "backups" ("id" integer primary key autoincrement not null, "type" varchar not null, "server_id" integer not null, "storage_id" integer not null, "database_id" integer, "interval" varchar not null, "keep_backups" integer not null, "status" varchar not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "backup_files" ("id" integer primary key autoincrement not null, "backup_id" integer not null, "name" varchar not null, "size" integer, "status" varchar not null, "restored_at" datetime, "created_at" datetime, "updated_at" datetime, "restored_to" varchar); -CREATE TABLE IF NOT EXISTS "projects" ("id" integer primary key autoincrement not null, "name" varchar not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "metrics" ("id" integer primary key autoincrement not null, "server_id" integer not null, "load" numeric not null, "memory_total" numeric not null, "memory_used" numeric not null, "memory_free" numeric not null, "disk_total" numeric not null, "disk_used" numeric not null, "disk_free" numeric not null, "created_at" datetime, "updated_at" datetime); -CREATE INDEX "metrics_server_id_created_at_index" on "metrics" ("server_id", "created_at"); -CREATE TABLE IF NOT EXISTS "user_project" ("id" integer primary key autoincrement not null, "user_id" integer not null, "project_id" integer not null, "created_at" datetime, "updated_at" datetime); -CREATE TABLE IF NOT EXISTS "script_executions" ("id" integer primary key autoincrement not null, "script_id" integer not null, "server_log_id" integer, "user" varchar not null, "variables" text, "status" varchar not null, "created_at" datetime, "updated_at" datetime); -INSERT INTO migrations VALUES(147,'2014_10_12_000000_create_users_table',1); -INSERT INTO migrations VALUES(148,'2014_10_12_100000_create_password_resets_table',1); -INSERT INTO migrations VALUES(149,'2018_08_08_100000_create_telescope_entries_table',1); -INSERT INTO migrations VALUES(150,'2019_08_19_000000_create_failed_jobs_table',1); -INSERT INTO migrations VALUES(151,'2019_12_14_000001_create_personal_access_tokens_table',1); -INSERT INTO migrations VALUES(152,'2021_06_23_192743_create_sessions_table',1); -INSERT INTO migrations VALUES(153,'2021_06_23_211827_create_servers_table',1); -INSERT INTO migrations VALUES(154,'2021_06_23_214143_create_services_table',1); -INSERT INTO migrations VALUES(155,'2021_06_25_102220_create_jobs_table',1); -INSERT INTO migrations VALUES(156,'2021_06_25_124831_create_server_logs_table',1); -INSERT INTO migrations VALUES(157,'2021_06_26_211903_create_sites_table',1); -INSERT INTO migrations VALUES(158,'2021_06_28_085814_create_source_controls_table',1); -INSERT INTO migrations VALUES(159,'2021_07_02_065815_create_deployments_table',1); -INSERT INTO migrations VALUES(160,'2021_07_03_133319_create_databases_table',1); -INSERT INTO migrations VALUES(161,'2021_07_03_133327_create_database_users_table',1); -INSERT INTO migrations VALUES(162,'2021_07_15_090830_create_firewall_rules_table',1); -INSERT INTO migrations VALUES(163,'2021_07_30_204454_create_cron_jobs_table',1); -INSERT INTO migrations VALUES(164,'2021_08_13_213657_create_deployment_scripts_table',1); -INSERT INTO migrations VALUES(165,'2021_08_14_165326_create_ssls_table',1); -INSERT INTO migrations VALUES(166,'2021_08_26_055643_create_redirects_table',1); -INSERT INTO migrations VALUES(167,'2021_08_27_064512_create_queues_table',1); -INSERT INTO migrations VALUES(168,'2021_08_29_210204_create_ssh_keys_table',1); -INSERT INTO migrations VALUES(169,'2021_08_30_174511_create_server_ssh_keys_table',1); -INSERT INTO migrations VALUES(170,'2021_11_12_093030_create_git_hooks_table',1); -INSERT INTO migrations VALUES(171,'2021_11_14_190808_create_server_providers_table',1); -INSERT INTO migrations VALUES(172,'2021_12_09_062430_create_scripts_table',1); -INSERT INTO migrations VALUES(173,'2021_12_10_204458_create_script_executions_table',1); -INSERT INTO migrations VALUES(174,'2021_12_24_151835_create_notification_channels_table',1); -INSERT INTO migrations VALUES(175,'2022_01_29_183900_create_storage_providers_table',1); -INSERT INTO migrations VALUES(176,'2022_02_11_085718_create_backups_table',1); -INSERT INTO migrations VALUES(177,'2022_02_11_085815_create_backup_files_table',1); -INSERT INTO migrations VALUES(178,'2023_07_21_210213_update_firewall_rules_table',1); -INSERT INTO migrations VALUES(179,'2023_07_23_143530_add_ssh_key_field_to_sites_table',1); -INSERT INTO migrations VALUES(180,'2023_07_30_163805_add_url_to_source_controls_table',1); -INSERT INTO migrations VALUES(181,'2023_07_30_200348_add_profile_to_source_controls_table',1); -INSERT INTO migrations VALUES(182,'2023_07_30_205328_add_source_control_id_to_sites_table',1); -INSERT INTO migrations VALUES(183,'2023_08_13_095440_update_storage_providers_table',1); -INSERT INTO migrations VALUES(184,'2023_08_17_231824_update_backups_table',1); -INSERT INTO migrations VALUES(185,'2023_08_25_183201_update_backup_files_table',1); -INSERT INTO migrations VALUES(186,'2023_09_10_185414_add_two_factor_fields_to_users_table',1); -INSERT INTO migrations VALUES(187,'2023_10_01_120250_create_projects_table',1); -INSERT INTO migrations VALUES(188,'2024_01_01_232932_update_servers_table',1); -INSERT INTO migrations VALUES(189,'2024_01_01_235900_update_users_table',1); -INSERT INTO migrations VALUES(190,'2024_04_07_204001_add_is_remote_to_server_logs_table',1); -INSERT INTO migrations VALUES(191,'2024_04_08_212940_create_metrics_table',1); -INSERT INTO migrations VALUES(192,'2024_04_24_213204_add_role_to_users_table',1); -INSERT INTO migrations VALUES(193,'2024_04_26_122230_create_user_project_table',1); -INSERT INTO migrations VALUES(194,'2024_04_26_123326_drop_user_id_from_projects_table',1); -INSERT INTO migrations VALUES(195,'2024_05_07_184201_add_project_id_to_source_controls_table',2); -INSERT INTO migrations VALUES(197,'2024_05_10_212155_add_updates_field_to_servers_table',3); -INSERT INTO migrations VALUES(198,'2024_06_06_093350_create_script_executions_table',4);