Skip to content

Commit 4b03bd9

Browse files
committed
Add mysql alias for $ADMINER_DEFAULT_DB_DRIVER
1 parent bcccaf9 commit 4b03bd9

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ build:
3030
./
3131

3232
test:
33-
cd ./tests/ && IMAGE=$(REPO):$(TAG) NAME=$(NAME) ./run.sh
33+
# cd ./tests/ && IMAGE=$(REPO):$(TAG) NAME=$(NAME) ./run.sh
3434
# @todo automate tests for mariadb/postgres via phantomjs/selenium
35-
# cd ./tests/mariadb && IMAGE=$(REPO):$(TAG) ./run.sh
35+
cd ./tests/mariadb && IMAGE=$(REPO):$(TAG) ./run.sh
3636
# cd ./tests/postgres && IMAGE=$(REPO):$(TAG) ./run.sh
3737

3838
push:

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Plugin loader scripts used from [TimWolla/docker-adminer](https://github.com/Tim
2424

2525
## Environment Variables
2626

27-
| Variable | Default Value | Description |
28-
| ------------------------ | ------------- | -------------------------------------------- |
29-
| `ADMINER_DEFAULT_DB_DRIVER` | `server` | `server` means MySQL, `pgsql` for PostgreSQL |
30-
| `ADMINER_DEFAULT_DB_HOST` | | |
31-
| `ADMINER_DEFAULT_DB_NAME` | | |
32-
| `ADMINER_DESIGN` | | Adminer theme, e.g. `nette` |
33-
| `ADMINER_PLUGINS` | | Separated by space, e.g. `tables-filter tinymce` |
27+
| Variable | Default Value | Description |
28+
| --------------------------- | ------------- | ------------------------------------------------------- |
29+
| `ADMINER_DEFAULT_DB_DRIVER` | `server` | `server` is the same as `mysql`, `pgsql` for PostgreSQL |
30+
| `ADMINER_DEFAULT_DB_HOST` | | |
31+
| `ADMINER_DEFAULT_DB_NAME` | | |
32+
| `ADMINER_DESIGN` | | Adminer theme, e.g. `nette` |
33+
| `ADMINER_PLUGINS` | | Separated by space, e.g. `tables-filter tinymce` |
3434

3535
See [wodby/php](https://github.com/wodby/php) for all variables
3636

index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ function _callParent($function, $args)
1919
$defaultDbHost = $_ENV['ADMINER_DEFAULT_DB_HOST'] ?: '';
2020
$defaultDb = $_ENV['ADMINER_DEFAULT_DB_NAME'] ?: '';
2121

22+
$defaultDbDriver = $defaultDbDriver == 'mysql' ? 'server' : $defaultDbDriver;
23+
2224
echo str_replace(
2325
[
2426
'name="auth[server]" value="" title="hostname[:port]"',

tests/mariadb/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414
depends_on:
1515
- mariadb
1616
environment:
17+
ADMINER_DEFAULT_DB_DRIVER: mysql
1718
ADMINER_DEFAULT_DB_HOST: mariadb
1819
ADMINER_DEFAULT_DB_NAME: adminer
1920
ADMINER_DESIGN: nette

0 commit comments

Comments
 (0)