Skip to content

Commit

Permalink
Merge pull request #197 from bavix/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rez1dent3 committed Aug 18, 2020
2 parents 09b5985 + 7c9d575 commit 1c26faf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_script:

script:
- ./vendor/bin/phpunit --coverage-xml=build/coverage-xml --log-junit=build/junit.xml
- ./vendor/bin/infection --coverage=build --min-msi=60 -j$(nproc)
- if [ $(phpenv version-name) = "7.4" ]; then ./vendor/bin/infection --coverage=build --min-msi=60 -j$(nproc); fi

after_success:
- if [ $(phpenv version-name) = "7.4" ]; then ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT; fi
Expand Down
7 changes: 6 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.3.1] - 2020-08-18
### Fixed
- Fixed migration issue with db table prefix #195 @reedknight @cispl-shaswatad

## [5.3.0] - 2020-08-10
### Added
- Add `resetConfirm`, `safeResetConfirm` methods (unconfirmed).
Expand Down Expand Up @@ -513,7 +517,8 @@ The operation is now executed in the transaction and updates the new `refund` fi
- Exceptions: AmountInvalid, BalanceIsEmpty.
- Models: Transfer, Transaction.

[Unreleased]: https://github.com/bavix/laravel-wallet/compare/5.3.0...develop
[Unreleased]: https://github.com/bavix/laravel-wallet/compare/5.3.1...develop
[5.3.1]: https://github.com/bavix/laravel-wallet/compare/5.3.0...5.3.1
[5.3.0]: https://github.com/bavix/laravel-wallet/compare/5.2.1...5.3.0
[5.2.1]: https://github.com/bavix/laravel-wallet/compare/5.2.0...5.2.1
[5.2.0]: https://github.com/bavix/laravel-wallet/compare/5.1.0...5.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function up(): void
];

if (DB::connection() instanceof MySqlConnection) {
$table = $this->table();
$table = DB::getTablePrefix() . $this->table();
$enumString = implode('\', \'', $enums);
$default = Transfer::STATUS_TRANSFER;
DB::statement("ALTER TABLE $table CHANGE COLUMN status status ENUM('$enumString') NOT NULL DEFAULT '$default'");
Expand All @@ -41,8 +41,8 @@ public function up(): void
}

if (DB::connection() instanceof PostgresConnection) {
$this->alterEnum($this->table(), 'status', $enums);
$this->alterEnum($this->table(), 'status_last', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status_last', $enums);
return;
}

Expand Down Expand Up @@ -77,7 +77,7 @@ public function down(): void
];

if (DB::connection() instanceof MySqlConnection) {
$table = $this->table();
$table = DB::getTablePrefix() . $this->table();
$enumString = implode('\', \'', $enums);
$default = Transfer::STATUS_PAID;
DB::statement("ALTER TABLE $table CHANGE COLUMN status status ENUM('$enumString') NOT NULL DEFAULT '$default'");
Expand All @@ -86,8 +86,8 @@ public function down(): void
}

if (DB::connection() instanceof PostgresConnection) {
$this->alterEnum($this->table(), 'status', $enums);
$this->alterEnum($this->table(), 'status_last', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status_last', $enums);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function up(): void
];

if (DB::connection() instanceof MySqlConnection) {
$table = $this->table();
$table = DB::getTablePrefix() . $this->table();
$enumString = implode('\', \'', $enums);
$default = Transfer::STATUS_TRANSFER;
DB::statement("ALTER TABLE $table CHANGE COLUMN status status ENUM('$enumString') NOT NULL DEFAULT '$default'");
Expand All @@ -40,8 +40,8 @@ public function up(): void
}

if (DB::connection() instanceof PostgresConnection) {
$this->alterEnum($this->table(), 'status', $enums);
$this->alterEnum($this->table(), 'status_last', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status_last', $enums);
return;
}
}
Expand All @@ -59,7 +59,7 @@ public function down(): void
];

if (DB::connection() instanceof MySqlConnection) {
$table = $this->table();
$table = DB::getTablePrefix() . $this->table();
$enumString = implode('\', \'', $enums);
$default = Transfer::STATUS_TRANSFER;
DB::statement("ALTER TABLE $table CHANGE COLUMN status status ENUM('$enumString') NOT NULL DEFAULT '$default'");
Expand All @@ -68,8 +68,8 @@ public function down(): void
}

if (DB::connection() instanceof PostgresConnection) {
$this->alterEnum($this->table(), 'status', $enums);
$this->alterEnum($this->table(), 'status_last', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status', $enums);
$this->alterEnum(DB::getTablePrefix() . $this->table(), 'status_last', $enums);
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function getEnvironmentSetUp($app): void
'sqlite' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
'prefix' => 'tests',
],
'pgsql' => [
'driver' => 'pgsql',
Expand All @@ -111,7 +111,7 @@ protected function getEnvironmentSetUp($app): void
'username' => 'postgres',
'password' => 'postgres',
'charset' => 'utf8',
'prefix' => '',
'prefix' => 'tests',
'schema' => 'public',
'sslmode' => 'prefer',
],
Expand Down

0 comments on commit 1c26faf

Please sign in to comment.