-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for every database handler (#49)
* add tests for every database handler * add permissions to the phpunit workflow * update workflow * update tests and workflow * update tests for SQLSRV * update tests * fix sqlsrv tests * update workflow * update skipLocked() method for OCI8 * update skipLocked() method for OCI8 * update tests * simplify the code as text type is deprecated in SQLSRV * fix rector * update sqlsrv extension in the workflow * froze ubuntu version * cleanup
- Loading branch information
Showing
8 changed files
with
321 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/Database/Migrations/2024-12-27-110712_ChangePayloadFieldTypeInSqlsrv.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of CodeIgniter Queue. | ||
* | ||
* (c) CodeIgniter Foundation <[email protected]> | ||
* | ||
* For the full copyright and license information, please view | ||
* the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CodeIgniter\Queue\Database\Migrations; | ||
|
||
use CodeIgniter\Database\BaseConnection; | ||
use CodeIgniter\Database\Migration; | ||
|
||
/** | ||
* @property BaseConnection $db | ||
*/ | ||
class ChangePayloadFieldTypeInSqlsrv extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
if ($this->db->DBDriver === 'SQLSRV') { | ||
$fields = [ | ||
'payload' => [ | ||
'name' => 'payload', | ||
'type' => 'NVARCHAR', | ||
'constraint' => 'MAX', | ||
'null' => false, | ||
], | ||
]; | ||
$this->forge->modifyColumn('queue_jobs', $fields); | ||
} | ||
} | ||
|
||
public function down(): void | ||
{ | ||
if ($this->db->DBDriver === 'SQLSRV') { | ||
$fields = [ | ||
'payload' => [ | ||
'name' => 'payload', | ||
'type' => 'TEXT', // already deprecated | ||
'null' => false, | ||
], | ||
]; | ||
$this->forge->modifyColumn('queue_jobs', $fields); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.