diff --git a/app/Console/Commands/SyncBunny.php b/app/Console/Commands/SyncBunny.php index 97c730668..88062fb6b 100644 --- a/app/Console/Commands/SyncBunny.php +++ b/app/Console/Commands/SyncBunny.php @@ -60,7 +60,7 @@ public function handle() ]; return PendingRequest::withHeaders($headers)->post('https://api.bunny.net/purge', [ "urls" => [$url], - ]); + ])->throw(); }); try { Http::pool(fn (Pool $pool) => [ @@ -72,15 +72,13 @@ public function handle() $pool->storage(file: "$parent_dir/scripts/$docker_install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$docker_install_script"), $pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$versions"), ]); - Http::pool(fn (Pool $pool) => [ - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file_prod"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$production_env"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$upgrade_script"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$install_script"), - $pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$docker_install_script"), - $pool->purge(url: "$bunny_cdn/$versions"), - ]); + Http::withHeaders([ + 'AccessKey' => env('BUNNY_API_KEY'), + 'Accept' => 'application/json', + ])->get('https://api.bunny.net/purge', [ + "url" => "$bunny_cdn/$bunny_cdn_path/*", + "async" => false + ])->throw(); echo "All files uploaded & purged...\n"; } catch (\Exception $e) { echo $e->getMessage(); diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 05ae5c747..dfbb9b70a 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('users', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->boolean('is_root_user')->default(false); $table->string('name')->default('Your Name Here'); 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 index 73b428ada..8411385d0 100644 --- 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 @@ -12,7 +12,7 @@ public function up(): void { Schema::create('personal_access_tokens', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->morphs('tokenable'); $table->string('name'); $table->string('token', 64)->unique(); diff --git a/database/migrations/2023_03_20_112410_create_activity_log_table.php b/database/migrations/2023_03_20_112410_create_activity_log_table.php index 7c05bc892..c1e10763c 100755 --- a/database/migrations/2023_03_20_112410_create_activity_log_table.php +++ b/database/migrations/2023_03_20_112410_create_activity_log_table.php @@ -9,7 +9,7 @@ class CreateActivityLogTable extends Migration public function up() { Schema::connection(config('activitylog.database_connection'))->create(config('activitylog.table_name'), function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('log_name')->nullable(); $table->text('description'); $table->nullableMorphs('subject', 'subject'); diff --git a/database/migrations/2023_03_20_112811_create_teams_table.php b/database/migrations/2023_03_20_112811_create_teams_table.php index 815392b1f..d03f596bc 100644 --- a/database/migrations/2023_03_20_112811_create_teams_table.php +++ b/database/migrations/2023_03_20_112811_create_teams_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('teams', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); $table->boolean('personal_team')->default(false); diff --git a/database/migrations/2023_03_20_112812_create_team_user_table.php b/database/migrations/2023_03_20_112812_create_team_user_table.php index 7b0956352..327af3e5d 100644 --- a/database/migrations/2023_03_20_112812_create_team_user_table.php +++ b/database/migrations/2023_03_20_112812_create_team_user_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('team_user', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->foreignId('team_id'); $table->foreignId('user_id'); $table->string('role')->nullable(); diff --git a/database/migrations/2023_03_20_112813_create_instance_settings_table.php b/database/migrations/2023_03_20_112813_create_instance_settings_table.php index 77fc68853..af725e444 100644 --- a/database/migrations/2023_03_20_112813_create_instance_settings_table.php +++ b/database/migrations/2023_03_20_112813_create_instance_settings_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('instance_settings', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('fqdn')->nullable(); $table->string('wildcard_domain')->nullable(); $table->string('redirect_url')->nullable(); diff --git a/database/migrations/2023_03_24_140711_create_servers_table.php b/database/migrations/2023_03_24_140711_create_servers_table.php index a8a964e8e..0993695ec 100644 --- a/database/migrations/2023_03_24_140711_create_servers_table.php +++ b/database/migrations/2023_03_24_140711_create_servers_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('servers', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); $table->string('description')->nullable(); diff --git a/database/migrations/2023_03_24_140712_create_server_settings_table.php b/database/migrations/2023_03_24_140712_create_server_settings_table.php index 5cad56b50..8ab2e1f9b 100644 --- a/database/migrations/2023_03_24_140712_create_server_settings_table.php +++ b/database/migrations/2023_03_24_140712_create_server_settings_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('server_settings', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->boolean('is_part_of_swarm')->default(false); diff --git a/database/migrations/2023_03_24_140853_create_private_keys_table.php b/database/migrations/2023_03_24_140853_create_private_keys_table.php index 176af3938..4478dcd71 100644 --- a/database/migrations/2023_03_24_140853_create_private_keys_table.php +++ b/database/migrations/2023_03_24_140853_create_private_keys_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('private_keys', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); $table->string('description')->nullable(); diff --git a/database/migrations/2023_03_27_075351_create_projects_table.php b/database/migrations/2023_03_27_075351_create_projects_table.php index a8010757a..880bb0781 100644 --- a/database/migrations/2023_03_27_075351_create_projects_table.php +++ b/database/migrations/2023_03_27_075351_create_projects_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('projects', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); $table->string('description')->nullable(); diff --git a/database/migrations/2023_03_27_075443_create_project_settings_table.php b/database/migrations/2023_03_27_075443_create_project_settings_table.php index 06bf554dc..11d590e30 100644 --- a/database/migrations/2023_03_27_075443_create_project_settings_table.php +++ b/database/migrations/2023_03_27_075443_create_project_settings_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('project_settings', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('wildcard_domain')->nullable(); diff --git a/database/migrations/2023_03_27_075444_create_environments_table.php b/database/migrations/2023_03_27_075444_create_environments_table.php index a8cd055e0..eacc0575a 100644 --- a/database/migrations/2023_03_27_075444_create_environments_table.php +++ b/database/migrations/2023_03_27_075444_create_environments_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('environments', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('name'); $table->foreignId('project_id'); $table->timestamps(); diff --git a/database/migrations/2023_03_27_081716_create_applications_table.php b/database/migrations/2023_03_27_081716_create_applications_table.php index fdfc68cff..76c5ec91d 100644 --- a/database/migrations/2023_03_27_081716_create_applications_table.php +++ b/database/migrations/2023_03_27_081716_create_applications_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('applications', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->integer('repository_project_id')->nullable(); $table->string('uuid')->unique(); $table->string('name'); diff --git a/database/migrations/2023_03_27_081717_create_application_settings_table.php b/database/migrations/2023_03_27_081717_create_application_settings_table.php index eeb65dfe1..d96763e2f 100644 --- a/database/migrations/2023_03_27_081717_create_application_settings_table.php +++ b/database/migrations/2023_03_27_081717_create_application_settings_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('application_settings', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->boolean('is_static')->default(false); $table->boolean('is_git_submodules_allowed')->default(true); $table->boolean('is_git_lfs_allowed')->default(true); diff --git a/database/migrations/2023_03_27_083620_create_databases_table.php b/database/migrations/2023_03_27_083620_create_databases_table.php index d60d66a28..b7cf3be8e 100644 --- a/database/migrations/2023_03_27_083620_create_databases_table.php +++ b/database/migrations/2023_03_27_083620_create_databases_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('databases', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); diff --git a/database/migrations/2023_03_27_083621_create_services_table.php b/database/migrations/2023_03_27_083621_create_services_table.php index 812e7901f..92c0cb4d0 100644 --- a/database/migrations/2023_03_27_083621_create_services_table.php +++ b/database/migrations/2023_03_27_083621_create_services_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('services', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); diff --git a/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php b/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php index 635b1f6c5..9f67f4b89 100644 --- a/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php +++ b/database/migrations/2023_03_27_085020_create_standalone_dockers_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('standalone_dockers', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('name'); $table->string('uuid')->unique(); $table->string('network'); diff --git a/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php b/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php index 79af98cb7..daff0bf34 100644 --- a/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php +++ b/database/migrations/2023_03_27_085022_create_swarm_dockers_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('swarm_dockers', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('name'); $table->string('uuid')->unique(); diff --git a/database/migrations/2023_03_28_062150_create_kubernetes_table.php b/database/migrations/2023_03_28_062150_create_kubernetes_table.php index 1b46a63fa..edfba61e8 100644 --- a/database/migrations/2023_03_28_062150_create_kubernetes_table.php +++ b/database/migrations/2023_03_28_062150_create_kubernetes_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('kubernetes', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->timestamps(); diff --git a/database/migrations/2023_03_28_083722_create_gits_table.php b/database/migrations/2023_03_28_083722_create_gits_table.php index 56eb2586e..113bab078 100644 --- a/database/migrations/2023_03_28_083722_create_gits_table.php +++ b/database/migrations/2023_03_28_083722_create_gits_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('gits', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->enum('type', ['github', 'gitlab', 'bitbucket', 'custom']); $table->string('api_url'); diff --git a/database/migrations/2023_03_28_083723_create_github_apps_table.php b/database/migrations/2023_03_28_083723_create_github_apps_table.php index a41dabee7..2336c6681 100644 --- a/database/migrations/2023_03_28_083723_create_github_apps_table.php +++ b/database/migrations/2023_03_28_083723_create_github_apps_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('github_apps', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); diff --git a/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php b/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php index c93ca8e19..b09379833 100644 --- a/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php +++ b/database/migrations/2023_03_28_083726_create_gitlab_apps_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('gitlab_apps', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); diff --git a/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php b/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php index 4e610e620..534adc7b0 100644 --- a/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php +++ b/database/migrations/2023_04_03_111012_create_local_persistent_volumes_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('local_persistent_volumes', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->string('name'); $table->string('mount_path'); diff --git a/database/migrations/2023_05_04_194548_create_environment_variables_table.php b/database/migrations/2023_05_04_194548_create_environment_variables_table.php index 8493acd0d..5ef480670 100644 --- a/database/migrations/2023_05_04_194548_create_environment_variables_table.php +++ b/database/migrations/2023_05_04_194548_create_environment_variables_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('environment_variables', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('key'); $table->string('value')->nullable(); diff --git a/database/migrations/2023_05_17_104039_create_failed_jobs_table.php b/database/migrations/2023_05_17_104039_create_failed_jobs_table.php index 08606bda4..87457647f 100644 --- a/database/migrations/2023_05_17_104039_create_failed_jobs_table.php +++ b/database/migrations/2023_05_17_104039_create_failed_jobs_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('failed_jobs', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('uuid')->unique(); $table->text('connection'); $table->text('queue'); diff --git a/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php index 372984c8b..a409dfde8 100644 --- a/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php +++ b/database/migrations/2023_05_24_083426_create_application_deployment_queues_table.php @@ -12,7 +12,7 @@ public function up(): void { Schema::create('application_deployment_queues', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id()->primary(); $table->string('application_id'); $table->integer('pull_request_id')->default(0); $table->schemalessAttributes('metadata');