diff --git a/database/migrations/2022_08_18_180137_change_migration_actions_table.php b/database/migrations/2022_08_18_180137_change_migration_actions_table.php index db230954..7bee9e45 100644 --- a/database/migrations/2022_08_18_180137_change_migration_actions_table.php +++ b/database/migrations/2022_08_18_180137_change_migration_actions_table.php @@ -3,11 +3,11 @@ declare(strict_types=1); use DragonCode\LaravelDeployOperations\Helpers\Config; -use DragonCode\LaravelDeployOperations\Operation; +use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Operation { +return new class extends Migration { public function up(): void { if ($this->hasTable()) { diff --git a/database/migrations/2023_01_21_172923_rename_migrations_actions_table_to_actions.php b/database/migrations/2023_01_21_172923_rename_migrations_actions_table_to_actions.php index cba1f950..09b2c3ae 100644 --- a/database/migrations/2023_01_21_172923_rename_migrations_actions_table_to_actions.php +++ b/database/migrations/2023_01_21_172923_rename_migrations_actions_table_to_actions.php @@ -3,10 +3,10 @@ declare(strict_types=1); use DragonCode\LaravelDeployOperations\Helpers\Config; -use DragonCode\LaravelDeployOperations\Operation; +use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; -return new class extends Operation { +return new class extends Migration { public function up(): void { if (Schema::hasTable('migration_actions') && $this->doesntSame('migration_actions', $this->table())) { diff --git a/database/migrations/2024_05_21_112438_rename_actions_table_to_operations.php b/database/migrations/2024_05_21_112438_rename_actions_table_to_operations.php index 0a18d9db..7ac147b9 100644 --- a/database/migrations/2024_05_21_112438_rename_actions_table_to_operations.php +++ b/database/migrations/2024_05_21_112438_rename_actions_table_to_operations.php @@ -3,10 +3,10 @@ declare(strict_types=1); use DragonCode\LaravelDeployOperations\Helpers\Config; -use DragonCode\LaravelDeployOperations\Operation; +use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; -return new class extends Operation { +return new class extends Migration { public function up(): void { if (Schema::hasTable('actions') && $this->doesntSame('actions', $this->table())) { diff --git a/database/migrations/2024_05_21_114318_rename_column_in_operations_table.php b/database/migrations/2024_05_21_114318_rename_column_in_operations_table.php index 823a0b20..8bb18a92 100644 --- a/database/migrations/2024_05_21_114318_rename_column_in_operations_table.php +++ b/database/migrations/2024_05_21_114318_rename_column_in_operations_table.php @@ -3,11 +3,11 @@ declare(strict_types=1); use DragonCode\LaravelDeployOperations\Helpers\Config; -use DragonCode\LaravelDeployOperations\Operation; +use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Operation { +return new class extends Migration { public function up(): void { $this->rename('action', 'operation'); diff --git a/src/Operation.php b/src/Operation.php index c127703a..187fd929 100644 --- a/src/Operation.php +++ b/src/Operation.php @@ -3,10 +3,9 @@ namespace DragonCode\LaravelDeployOperations; use DragonCode\LaravelDeployOperations\Concerns\Artisan; -use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Arr; -abstract class Operation extends Migration +abstract class Operation { use Artisan; @@ -44,6 +43,11 @@ abstract class Operation extends Migration /** Defines whether the operation will run synchronously or asynchronously. */ protected bool $async = false; + public function getConnection(): ?string + { + return config('deploy-operations.connection'); + } + /** * Determines the type of launch of the deploy operation. *