Skip to content

Commit 8105e4e

Browse files
authored
Merge pull request #251 from kitloong/feature/ci
Update
2 parents 1ad5e56 + bdee2d0 commit 8105e4e

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,16 @@ jobs:
9292
- name: Checkout code
9393
uses: actions/checkout@v4
9494

95+
- name: Install sqlcmd
96+
uses: potatoqualitee/mssqlsuite@v1.8
97+
with:
98+
install: sqlengine, sqlclient, sqlpackage
99+
version: 2019
100+
95101
- name: SQL Server Create Database
96102
run: |
97103
# Create DB
98-
sqlcmd -S 127.0.0.1 -U sa -P '!QAZ2wsx' -Q 'CREATE DATABASE migration' -b
104+
sqlcmd -S 127.0.0.1 -U sa -P '!QAZ2wsx' -Q 'CREATE DATABASE migration' -C -b
99105
100106
- name: Setup PHP
101107
uses: shivammathur/setup-php@v2

src/Database/PgSQLSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getTableNames(): Collection
4444

4545
return $table['schema'] === $searchPath;
4646
})
47-
->pluck('name')
47+
->map(static fn (array $table): string => $table['name'])
4848
->values();
4949
}
5050

src/Migration/Generator/IndexGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function getNotChainableIndexes(Collection $indexes, Collection $chainabl
101101
/**
102102
* Get column names with length.
103103
*
104-
* @return array<string|\Illuminate\Database\Query\Expression>
104+
* @return array<string>
105105
*/
106106
private function getColumns(Index $index): array
107107
{

tests/Feature/SQLSrv/SQLSrvTestCase.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ protected function getEnvironmentSetUp($app): void
1818

1919
$app['config']->set('database.default', 'sqlsrv');
2020
$app['config']->set('database.connections.sqlsrv', [
21-
'driver' => 'sqlsrv',
22-
'url' => env('DATABASE_URL'),
23-
'host' => env('SQLSRV_HOST'),
24-
'port' => env('SQLSRV_PORT'),
25-
'database' => env('SQLSRV_DATABASE'),
26-
'username' => env('SQLSRV_USERNAME'),
27-
'password' => env('SQLSRV_PASSWORD'),
28-
'charset' => 'utf8',
29-
'prefix' => '',
30-
'prefix_indexes' => true,
21+
'driver' => 'sqlsrv',
22+
'url' => env('DATABASE_URL'),
23+
'host' => env('SQLSRV_HOST'),
24+
'port' => env('SQLSRV_PORT'),
25+
'database' => env('SQLSRV_DATABASE'),
26+
'username' => env('SQLSRV_USERNAME'),
27+
'password' => env('SQLSRV_PASSWORD'),
28+
'charset' => 'utf8',
29+
'prefix' => '',
30+
'prefix_indexes' => true,
31+
'trust_server_certificate' => true,
3132
]);
3233
}
3334

0 commit comments

Comments
 (0)