recreate-test-db
Skill107 starsChanged 9 months agoMITView on GitHub
Recreate the Redmine test database from scratch (delete db/schema.rb and db/redmine.sqlite3_test, then run core and plugin migrations with RAILS_ENV=test). Use when the test DB is out of sync, migrations changed, or the user asks to rebuild/reset the test database.
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- commitSkill
- create-pull-requestSkill
- create-release-branchSkill
- create-release-notesSkill
- handle-pr-reviewSkill
- qlty-checkSkill
- record-code-review-feedbackSkill
- record-spec-feedbackSkill
- redmine-playwright-loginSkill
- regression-checkSkill
- rubocopSkill
- speckit-agent-context-updateSkill
- speckit-analyzeSkill
- speckit-branch-convention-configureSkill
- speckit-branch-convention-renameSkill
- speckit-branch-convention-validateSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-review-codeSkill
- speckit-review-commentsSkill
- speckit-review-errorsSkill
- speckit-review-runSkill
- speckit-review-simplifySkill
- speckit-review-testsSkill
- speckit-review-typesSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- speckit-token-budget-compactSkill
- speckit-token-budget-conciseSkill
- speckit-token-budget-scopeSkill
- speckit-token-budget-usageSkill
- speckit-wiki-ingestSkill
- speckit-wiki-initSkill
- speckit-wiki-lintSkill
- speckit-wiki-querySkill
- speckit-wiki-statusSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Do NOT touch db/redmine.sqlite3 (the development DB).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Recreate Test Database
Rebuild the SQLite test database of the Redmine instance at /usr/local/redmine.
IMPORTANT: Never run
rails test. Only run the steps below, and only when the user asks to rebuild the test DB. Never migrate the test DB on your own initiative.
Workflow
Run from /usr/local/redmine.
Step 1: Delete the generated schema
db/schema.rb is git-ignored and regenerated by migrations. It may be absent; that is fine.
rm -f /usr/local/redmine/db/schema.rbStep 2: Delete the test database
rm -f /usr/local/redmine/db/redmine.sqlite3_testDo NOT touch db/redmine.sqlite3 (the development DB).
Step 3: Run core migrations
cd /usr/local/redmine && bundle exec rake db:migrate RAILS_ENV=test 2>&1 | tail -30Step 4: Run plugin migrations
Core db:migrate does not run plugin migrations.
cd /usr/local/redmine && bundle exec rake redmine:plugins:migrate RAILS_ENV=test 2>&1 | tail -30Step 5: Report
State whether both migrations finished without errors and name the last migration applied in each. Do not run tests unless asked.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

