Skip to content
Agent Orchestration
Command

/check_schema_version

Check the Flyway schema version of the SQLite database on a Docker volume

From plugin
task-orchestrator
2142 skills5 agents2 commands
> /plugin marketplace add jpicklyk/task-orchestrator
> /plugin install task-orchestrator@task-orchestrator-marketplace

Command definition

check_schema_version.md
description: Check the Flyway schema version of the SQLite database on a Docker volume

Check the schema version of the Task Orchestrator database on a Docker volume.

Instructions

1. Parse the volume name from the user's command, defaulting to "mcp-task-data" if not provided 2. Create a temporary SQL file with the query 3. Run the Docker command mounting both the volume and the project directory 4. Display the results in a clear, formatted way 5. Clean up the temporary SQL file

Working Pattern (Windows Git Bash Compatible)

Due to shell escaping issues on Windows, use a mounted SQL file approach:

**Step 1:** Create temporary SQL file in project root:

-- File: .tmp_check_schema.sql (in project root directory)
.mode box
.headers on

SELECT
    installed_rank,
    version,
    description,
    type,
    script,
    installed_on,
    execution_time,
    success
FROM flyway_schema_history
ORDER BY installed_rank DESC
LIMIT 10;

-- 4.0 only: data_steps (V23). The sqlite3 shell does not stop at an error, so on a 3.x database
-- this prints `no such table: data_steps` and the migration list above is unaffected.
SELECT name, applied_at, rows_affected, binary_version
FROM data_steps
ORDER BY applied_at;

**Temp File Location:** Create `.tmp_check_schema.sql` in the current working directory (the project root or worktree), since Step 2 mounts `${PWD}`.

**Step 2:** Run via Docker with mounted SQL file:

powershell.exe -Command "docker run --rm -v {{VOLUME_NAME}}:/data -v '${PWD}:/work' alpine sh -c 'apk add --no-cache sqlite >/dev/null 2>&1 && sqlite3 /data/current-tasks.db < /work/.tmp_check_schema.sql'"

**Step 3:** Clean up:

rm .tmp_check_schema.sql

**Note:** The `alpine/sqlite` image doesn't work well with inline SQL on Windows. Use `alpine` with sqlite installed instead.

Expected Output Format

Present the results with:

  • Current schema version (the most recent migration)
  • List of recent migrations (up to 10)
  • Success status for each migration
  • Installation timestamps
  • The `data_steps` rows (`name, applied_at, rows_affected, binary_version`) when the database is at V23 or later; a 3.x database has no such table, so expect `no such table: data_steps` there (harmless)

If the query fails:

  • Explain that the volume may not exist, or
  • The database may not have been initialized with Flyway, or
  • The database file doesn't exist yet

Additional Helpful Commands

After showing the results, offer these follow-up options:

1. **Show all migrations:** Remove the LIMIT from the SQL query 2. **Show table structure:** Create SQL file with `.schema flyway_schema_history` 3. **Show all tables:** Create SQL file with `.tables` 4. **Check database file:**

   docker run --rm -v {{VOLUME_NAME}}:/data alpine ls -lh /data/

Usage Examples

/check_schema_version

Checks the default `mcp-task-data` volume.

/check_schema_version my-custom-volume

Checks the `my-custom-volume` Docker volume.

Read more
@jpicklyk
Ships withtask-orchestrator

Server-enforced workflow discipline for AI agents. Prompt-based frameworks hope the LLM follows instructions. This one blocks the call if it doesn't.

21430 skills5 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
214
Star history of jpicklyk/task-orchestrator on GitHub, a chart by star-history.com

Other commands on task-orchestrator.

More commands from other plugins.

COMMAND_COMPLIANCE_REPORT

COMMAND_COMPLIANCE_REP…

Command

Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools…

@ruvnet@ruvnetInstall Command
ask

ask

Command

This compatibility command keeps `/oh-my-claudecode:ask` available without loading the full `ask` skill description in every…

@yeachan-heo@yeachan-heoInstall Command