Skip to content

Add sqlite tests#1306

Merged
dajimenezriv-internxt merged 7 commits intomainfrom
add-sqlite-tests
Mar 9, 2026
Merged

Add sqlite tests#1306
dajimenezriv-internxt merged 7 commits intomainfrom
add-sqlite-tests

Conversation

@dajimenezriv-internxt
Copy link
Contributor

@dajimenezriv-internxt dajimenezriv-internxt commented Mar 9, 2026

What

Ticket: https://inxt.atlassian.net/browse/PB-6005

Due to problems with how we were handling migrations in TypeORM some things that we thought were migrated were indeed not, like the field fileId from file to still being unique when it shouldn't. Right now we are still thinking about what ORM to use since we need more customization for migrations and we need them to be able to be run from the code itself, something that for example leaves PrismaORM outside.

However this had a problem with the native dependency better-sqlite3 since it was built to the electron node version instead of our local node version (electron doesn't use the same version as in our local). After many attempts, we have finally been able to build the better-sqlite3 version to our local node version so we can run tests against a real in memory sqlite database. During this process we have been testing upgrading also the node version to 24 and the electron version to 40 (latest), so it's included also in this PR.

So, what this PR does is to first prepare the code with real tests for sqlite so later we can tests the migrations in a better way:

  1. Update node and electron version.
  2. Add integration tests against sqlite.
  3. Add the rebuild command to build better-sqlite3 to electron or local node, depending on what we need at the moment.

I've disabled also the check PR size pipeline since 95% of the code modified are just tests.

@dajimenezriv-internxt dajimenezriv-internxt self-assigned this Mar 9, 2026
@dajimenezriv-internxt dajimenezriv-internxt requested review from larryrider and removed request for larryrider March 9, 2026 13:01
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@dajimenezriv-internxt dajimenezriv-internxt merged commit 3e6b41a into main Mar 9, 2026
6 checks passed
@dajimenezriv-internxt dajimenezriv-internxt deleted the add-sqlite-tests branch March 9, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants