Skip to content

Commit

Permalink
Merge pull request #8 from tyler36/tyler36/issue7_update-readme
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
robertoperuzzo authored Apr 19, 2023
2 parents 3654de2 + 0a6b703 commit 80457e5
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ddev get robertoperuzzo/ddev-sqlsrv
ddev restart
```

If in your project you already have a `.ddev/.env` file, you need to add the following lines to it:
If your project already has a `.ddev/.env` file, you need to add the following lines to it:

```dotenv
MSSQL_EXTERNAL_PORT=1433
Expand All @@ -39,35 +39,28 @@ ddev drupal-regex
```

This script also changes the setting for the following database variables:

* `show advanced options` will be set to 1
* `clr strict security` will be set to 0
* `clr enable` will be set to 1

Drupal also the module `sqlsrv` to be installed as it is providing the database driver for SQL Server. The module can be installed with composer with the following command:
Drupal also required the [`sqlsrv` module](https://www.drupal.org/project/sqlsrv) to be installed as it is provides the database driver for SQL Server. The module can be installed with composer with the following command:

```bash
ddev composer require drupal/sqlsrv
```

**For Drupal 9.4+ you need the patch #4 posted in the issue [Call to a member function fetchField() on null
**There is an open issue for Drupal 9.4+ installations. Until merged, you need to apply [patch #4](https://www.drupal.org/project/sqlsrv/issues/3291199#comment-14576456), see [Call to a member function fetchField() on null
](https://www.drupal.org/project/sqlsrv/issues/3291199)**

## Disabling MySQL & MariaSQL

* If your project only uses a SQL Server database, you can disable the MySql & MariaDb services.
* Run the following command from your project root.

```bash
ddev config --omit-containers db
```
## Manually enabling MySQL/MariaDB

* Alternatively, you can update your project's `.ddev/config.yaml` directly by updating the following line:
**This addons disables the default database by automatically adding `omit_containers: [db,dba]` in the `config.sqlsrv.yaml`**

```yaml
omit_containers: [db]
```
If your project needs to use both MariaDB and MS SQL Server databases, you have to remove `#ddev-generated` and
`omit_containers: [db,dba]` from `config.sqlsrv.yaml`.

* See [.ddev/config.yaml Options](https://ddev.readthedocs.io/en/stable/users/extend/config_yaml/) for additional notes.
See [.ddev/config.yaml Options](https://ddev.readthedocs.io/en/stable/users/extend/config_yaml/) for additional notes.

## Links with useful information

Expand Down

0 comments on commit 80457e5

Please sign in to comment.