Skip to content

Commit

Permalink
Merge pull request #155 from TheDragonCode/6.x
Browse files Browse the repository at this point in the history
Fixed tests
  • Loading branch information
andrey-helldar authored May 21, 2024
2 parents 1c8a9d7 + b47324a commit 6f16602
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
8 changes: 6 additions & 2 deletions src/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 6f16602

Please sign in to comment.