Skip to content

BREAKING CHANGE: Apply database migrations to reduce complexity#139

Merged
cmenon12 merged 27 commits intomainfrom
breaking-changes
Jan 4, 2026
Merged

BREAKING CHANGE: Apply database migrations to reduce complexity#139
cmenon12 merged 27 commits intomainfrom
breaking-changes

Conversation

@cmenon12
Copy link
Member

@cmenon12 cmenon12 commented Jan 2, 2026

Description

Create migrations to apply breaking changes to reduce the application complexity:

  • Migration statuses are stored in the migrations collection.
  • Rollback is not supported.
  • A relevant section has been added to the README.

The five migration scripts are:

  • Add next question value - if a prototype question is not branching and doesn't have a next_question_value, then add this as pointing to the next question, or to finish if it's the last question.
    • This allows us to assert that branching questions will never have a next_question_value, and non-branching questions always will.
  • Add show progress indicators - if a prototypes doesn't have show_progress_indicators, add it as true if the prototype doesn't contain a branching question, otherwise false.
    • This allows us to assert that this property is always present.
  • Add isActive and isAdmin booleans to users - add these if not defined, and ensure at least one user is an admin.
  • Add prompt and remove chat history - add a prompt property to all prototypes created from a text prompt (create or update) or set as undefined if created from JSON. Delete the chat history.
  • Remove the timestamp property from prototypes.
    • This allows us to use the MongoDB createdAt property instead.

Also:

  • Fix the type used for createdAt and updatedAt properties.

A new release will need to be created as a major update, with clear instructions to run the migrations.

Related issues: closes #85

Checklist before marking as ready for review

Before marking as ready for review, please check that you have:

  • Added appropriate and passing tests for the changes I made.
  • Not broken any existing functionality or tests.
  • Not introduced any new linting or formatting errors.
  • Only added new dependencies that are necessary, do not introduce security vulnerabilities, and with tilde (~) version ranges.
  • Checked and resolved UI accessibility issues using Axe devtools. Unresolved issues are described above.
  • Updated the documentation if necessary.

Check the contributing guidelines for more details.

Screenshots (if appropriate)

cmenon12 and others added 19 commits December 12, 2025 16:41
* Bump qs from 6.14.0 to 6.14.1

Bumps [qs](https://github.com/ljharb/qs) from 6.14.0 to 6.14.1.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.14.0...v6.14.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump qs from 6.14.0 to 6.14.1 in /data/zip-download

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Menon <16004217+cmenon12@users.noreply.github.com>
Bumps the gh-actions-minor-and-patch-updates group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.31.7 to 4.31.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@cf1bb45...5d4e8d1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gh-actions-minor-and-patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@0057852...9255dc7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@cmenon12 cmenon12 self-assigned this Jan 2, 2026
@cmenon12 cmenon12 added the breaking change Creates a breaking change label Jan 2, 2026
@cmenon12 cmenon12 marked this pull request as ready for review January 4, 2026 15:40
@cmenon12 cmenon12 merged commit 14442c7 into main Jan 4, 2026
8 checks passed
@cmenon12 cmenon12 deleted the breaking-changes branch January 4, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Creates a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make breaking changes to reduce complexity

1 participant