Skip to content

Move the demo db dump user cypress as that is where it is used #8108

Merged
DawoudIO merged 8 commits intomasterfrom
feature/rename-demo-seed-sql
Mar 1, 2026
Merged

Move the demo db dump user cypress as that is where it is used #8108
DawoudIO merged 8 commits intomasterfrom
feature/rename-demo-seed-sql

Conversation

@DawoudIO
Copy link
Contributor

@DawoudIO DawoudIO commented Mar 1, 2026

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

  • ✨ Feature
  • 🐛 Bug fix
  • ♻️ Refactor
  • 🏗️ Build/Infrastructure
  • 🔒 Security

Testing

Screenshots

Security Check

  • Introduces new input validation
  • Modifies authentication/authorization
  • Affects data privacy/GDPR

Code Quality

  • Database: Propel ORM only, no raw SQL
  • No deprecated attributes (align, valign, nowrap, border, cellpadding, cellspacing, bgcolor)
  • Bootstrap CSS classes used
  • All CSS bundled via webpack

Pre-Merge

  • Tested locally
  • No new warnings
  • Build passes
  • Backward compatible (or migration documented)

@DawoudIO DawoudIO requested a review from a team as a code owner March 1, 2026 06:35
@DawoudIO DawoudIO requested review from DAcodedBEAT, MrClever, bigtigerku, Copilot, grayeul and respencer and removed request for a team March 1, 2026 06:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sql to cypress/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.sh and docs/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

  • updateDBDemoSQL updates AUTO_INCREMENT using a generic /(AUTO_INCREMENT=)(\d+)/ replace, which will hit the first AUTO_INCREMENT in the dump (e.g., calendars) rather than the version_ver table. This will corrupt the seed dump and still leave version_ver's AUTO_INCREMENT unchanged. Tighten the replacement to only target the CREATE TABLE version_ver`` block (or compute/replace AUTO_INCREMENT for version_ver specifically).
    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.

Comment on lines 9 to 11
volumes:
- ../demo:/docker-entrypoint-initdb.d
- ../cypress/data:/docker-entrypoint-initdb.d
hostname: crm-database
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot is this still an issue

Comment on lines 107 to 110
// 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
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Copy link
Contributor

Copilot AI commented Mar 1, 2026

@DawoudIO I've opened a new pull request, #8109, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits March 1, 2026 07:18
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).
@DawoudIO DawoudIO changed the title Feature/rename demo seed sql Move the demo db dump user cypress as that is where it is used Mar 1, 2026
@DawoudIO DawoudIO added this to the 7.0.1 milestone Mar 1, 2026
@DawoudIO DawoudIO merged commit 2418a34 into master Mar 1, 2026
12 checks passed
@DawoudIO DawoudIO deleted the feature/rename-demo-seed-sql branch March 1, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants