Skip to content

Commit 74d9397

Browse files
Add suporte para banco de dados MSSQL Server 2017+ (#5)
* feat: add support to database mssql-server * docs: updated README added mssql in database supported list + add contributor
1 parent 2100e9c commit 74d9397

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ SQLite | 3.26.0+ | ✅
5252
Mysql | 5.7+ | ✅
5353
MariaDB | 10.3+ | ✅
5454
PostgreSQL | 10.0+ | ✅
55-
SQLServer | - | ❌
55+
SQLServer | 2017+ | ✅
5656

5757

5858
### Contributing
@@ -62,10 +62,10 @@ Please, fork this repository, make any changes and submit a Pull Request and we
6262

6363
### Contributors
6464

65-
| <a href="http://jdsantos.github.io" target="_blank">**Jorge Santos**</a>
66-
|:---:|
67-
| [![jdsantos](https://avatars1.githubusercontent.com/u/1708961?v=3&s=50)](http://jdsantos.github.io) |
68-
| <a href="https://github.com/jdsantos" target="_blank">`github.com/jdsantos`</a>
65+
| <a href="https://jdsantos.github.io" target="_blank">**Jorge Santos**</a> | <a href="https://walissonaguirra.github.io" target="_blank">**Walisson Aguirra**</a> |
66+
|:---:|:---:|
67+
| [![jdsantos](https://avatars1.githubusercontent.com/u/1708961?v=3&s=50)](http://jdsantos.github.io) | [![walissonaguirra](https://avatars.githubusercontent.com/u/53498071?v=4&s=50)](https://github.com/walissonaguirra) |
68+
| <a href="https://github.com/jdsantos" target="_blank">`github.com/jdsantos`</a> | <a href="https://github.com/walissonaguirra" target="_blank">`github.com/walissonaguirra`</a> |
6969

7070
### Support
7171

src/Handlers/ConcreteStubConfigurator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ConcreteStubConfigurator implements StubConfigurator
1515
'mysql',
1616
'mariadb',
1717
'pgsql',
18+
'mssql',
1819
];
1920

2021
/**

src/Stubs/databases/mssql.stub

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Instalar extensões PHP para SQL Server
2+
RUN set -ex; \
3+
apk --no-cache add \
4+
unixodbc-dev \
5+
curl \
6+
$PHPIZE_DEPS \
7+
; \
8+
\
9+
# Baixa e instala o driver ODBC da Microsoft para SQL Server
10+
curl -fsSL https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_18.3.3.1-1_amd64.apk -o /tmp/msodbcsql18.apk; \
11+
apk add --allow-untrusted /tmp/msodbcsql18.apk; \
12+
\
13+
# Instalar extensões PHP sqlsrv e pdo_sqlsrv via PECL
14+
pecl install sqlsrv pdo_sqlsrv; \
15+
\
16+
# Habilitar as extensões
17+
docker-php-ext-enable sqlsrv pdo_sqlsrv; \
18+
\
19+
rm -rf /tmp/*;

0 commit comments

Comments
 (0)