Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: read

env:
ERVISIO_REF: v0.5.0
ERVISIO_REF: v0.6.2

jobs:
build:
Expand Down Expand Up @@ -58,3 +58,24 @@ jobs:
name: plugin
path: dist/*.tar.gz*
retention-days: 7

bridge-windows:
# The bridge has to start and run its system-independent actions on Windows too.
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Compile
run: python -m py_compile db-bridge.py
- name: Smoke test (detect, create-sqlite, query)
shell: bash
run: |
python db-bridge.py detect | python -c "import json,sys; d=json.load(sys.stdin); assert 'instances' in d"
db="$RUNNER_TEMP/smoke.sqlite"
python db-bridge.py create-sqlite "$(printf '{"path":"%s"}' "$(cygpath -m "$db")" | base64 -w0)" | python -c "import json,sys; assert json.load(sys.stdin)['ok']"
inst="$(printf '{"instance":{"engine":"sqlite","path":"%s"},"sql":"SELECT 1 AS n"}' "$(cygpath -m "$db")" | base64 -w0)"
python db-bridge.py query "$inst" | python -c "import json,sys; d=json.load(sys.stdin); assert d['rows'][0]['n']==1, d"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
contents: read

env:
ERVISIO_REF: v0.5.0
ERVISIO_REF: v0.6.2

jobs:
release:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to the Ervisio Database Plugin will be documented in this file.

## 1.2.0

* Windows support (needs Ervisio 0.6.2 and `@ervisio/plugin-sdk` 0.3.0): the manifest declares `platforms: ["linux", "windows"]` and a separate `db-bridge` command for Windows (`python.exe`).
* Windows engines: Docker Desktop containers, native MariaDB/MySQL/PostgreSQL detected and controlled as Windows services (`net.exe`), installed with `winget`, SQLite discovery in the user profile and `%ProgramData%`.
* The bridge no longer depends on `sudo` (skipped when root or on Windows), on `tail`, or on the console code page.
* CI validates the manifest with Ervisio 0.6.2 and smoke-tests the bridge on a Windows runner.

## 1.1.0

* HeidiSQL-grade database workbench for MySQL, MariaDB, PostgreSQL, and SQLite.
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,22 @@ The dialog lists the permissions below; updates appear in **Plugins › Updates*
* Toggle the slow query log on/off dynamically with custom duration thresholds.
* Real-time viewing of recent slow log entries.

## Windows

Needs Ervisio 0.6.2 or later on Windows and Python 3.10+ (`python.exe` on the `PATH` of the account that runs the daemon).
The plugin lives in `%ProgramData%\Ervisio\data\plugins\database`. On Windows:

* **Docker**: Docker Desktop or Docker Engine (`docker.exe` on the `PATH`).
* **Native**: MariaDB, MySQL and PostgreSQL registered as Windows services are detected and started, stopped and restarted from the card view; installation uses `winget`.
* **Administrator rights**: operations that install or control services need the administrator unlock in Ervisio (members of `docker-users` run Docker commands as themselves).
* The Python packages `pymysql` and `psycopg2` must be installed for that Python (`pip install pymysql psycopg2-binary`); SQLite needs nothing.

## Permissions

The manifest is [plugin/manifest.json](plugin/manifest.json). In short:

* **Commands**, all `admin` with `adminUnlessGroup: docker`:
* `db-bridge` (`python3 /var/lib/ervisio/plugins/database/db-bridge.py {0} {1}`):
* **Commands**, all `admin` with `adminUnlessGroup: docker` (`docker-users` on Windows):
* `db-bridge` (`python3 /var/lib/ervisio/plugins/database/db-bridge.py {0} {1}` on Linux, `python.exe C:\ProgramData\Ervisio\data\plugins\database\db-bridge.py {0} {1}` on Windows):
Executes database administration operations, schema introspection, container management, and query dispatching.
* **Folders**:
* `~/.config/ervisio/plugins/database` (created on first use; saved connections, preferences).
Expand Down
Loading
Loading