Move the demo db dump user cypress as that is where it is used #8108
Move the demo db dump user cypress as that is where it is used #8108
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes the canonical demo database seed SQL to cypress/data/seed.sql across local dev (DDEV), Docker-based environments, release automation, and Cypress tests/documentation.
Changes:
- Update tooling/configuration references from
demo/ChurchCRM-Database.sqltocypress/data/seed.sql(release script, workflows, Docker Compose, DDEV, docs, Cypress spec). - Add the new demo seed dump at
cypress/data/seed.sql. - Remove
install/install.shanddocs/maps/MAPS-01-geocoding-audit.md.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/startNewRelease.js | Points release automation at cypress/data/seed.sql for version stamping. |
| install/install.sh | Removes the legacy installer script. |
| docs/maps/MAPS-01-geocoding-audit.md | Removes the MAPS-01 geocoding audit document. |
| docker/docker-compose.yaml | Uses ../cypress/data for MariaDB init seed volume. |
| docker/docker-compose.parallel.yaml | Uses ../cypress/data for MariaDB init seed volume in CI-parallel setup. |
| cypress/e2e/new-system/03-backup-restore.spec.js | Updates restore test to upload/verify seed.sql. |
| cypress/data/seed.sql | Adds the auto-generated demo DB dump used by dev/test tooling. |
| CONTRIBUTING.md | Updates DDEV “import-db” guidance to the new seed path. |
| .github/workflows/start-release.yml | Updates release commit step to include cypress/data/seed.sql. |
| .ddev/config.yaml | Imports seed DB from /var/www/html/cypress/data/seed.sql on first start. |
| .ddev/commands/web/setup-churchcrm | Updates help text to reference the new seed path. |
| .agents/skills/churchcrm/development-workflows.md | Updates documented canonical demo dump location to cypress/data/seed.sql. |
Comments suppressed due to low confidence (3)
scripts/startNewRelease.js:167
updateDBDemoSQLupdatesAUTO_INCREMENTusing a generic/(AUTO_INCREMENT=)(\d+)/replace, which will hit the first AUTO_INCREMENT in the dump (e.g.,calendars) rather than theversion_vertable. This will corrupt the seed dump and still leaveversion_ver's AUTO_INCREMENT unchanged. Tighten the replacement to only target theCREATE TABLEversion_ver`` block (or compute/replace AUTO_INCREMENT forversion_verspecifically).
const demoSQLFile = "cypress/data/seed.sql";
try {
console.log(`Updating ${demoSQLFile} with new version entry...`);
install/install.sh:1
- This PR’s stated goal is renaming the demo seed SQL, but it also deletes the installer script. If this removal is intentional, it should be called out in the PR description (including any replacement path/docs) or moved into a separate PR to keep changes focused.
docs/maps/MAPS-01-geocoding-audit.md:1 - This PR’s stated goal is renaming the demo seed SQL, but it also removes this MAPS geocoding audit doc. If the doc is obsolete, please note that explicitly in the PR description (and ideally point to the new canonical location if it was moved); otherwise consider keeping doc-only changes separate from the seed rename to reduce review surface area.
| volumes: | ||
| - ../demo:/docker-entrypoint-initdb.d | ||
| - ../cypress/data:/docker-entrypoint-initdb.d | ||
| hostname: crm-database |
There was a problem hiding this comment.
This compose file now mounts ../cypress/data for DB initialization, but .devcontainer/docker-compose.override.yml still mounts ../demo (verified in repo). To keep dev environments consistent (and avoid a missing-path init volume), update the devcontainer override to use the same ../cypress/data seed location.
| // The demo SQL file path (relative to cypress project root) | ||
| const demoSqlPath = 'demo/ChurchCRM-Database.sql'; | ||
| const demoSqlPath = 'cypress/data/seed.sql'; | ||
|
|
||
| // Use cy.selectFile to upload the file |
There was a problem hiding this comment.
The renamed seed SQL file path is stored in demoSqlPath, which is now misleading (it's no longer the demo/ ChurchCRM-Database.sql file). Rename the variable to match the new meaning (e.g., seedSqlPath) to avoid confusion when maintaining the test.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: DawoudIO <554959+DawoudIO@users.noreply.github.com>
…8109) The variable `demoSqlPath` was misleading — it referenced `cypress/data/seed.sql`, not a demo SQL file. Renamed to `seedSqlPath` for clarity. ### Changes - **`cypress/e2e/new-system/03-backup-restore.spec.js`**: Renamed `demoSqlPath` → `seedSqlPath` and updated the inline comment to match. ```js // Before const demoSqlPath = 'cypress/data/seed.sql'; cy.get('#restoreFile').selectFile(demoSqlPath, { force: true }); // After const seedSqlPath = 'cypress/data/seed.sql'; cy.get('#restoreFile').selectFile(seedSqlPath, { force: true }); ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
What Changed
Move the demo db dump user cypress as that is where it is used
it was used in the demo website but now only used for Cypress tests
Type
Testing
Screenshots
Security Check
Code Quality
Pre-Merge