Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqlite): change to better-sqlite3 to fix packaging with node 16 #403

Closed
wants to merge 14 commits into from

Conversation

samuelmasse
Copy link
Contributor

Closes DEV-2424

@linear
Copy link

linear bot commented Mar 10, 2022

@samuelmasse
Copy link
Contributor Author

knex-schema-inspector doesn't work with better-sqlite3, even though supporting it would require 1 line fix knex/knex-schema-inspector#95

Comment on lines +165 to 166
.orderBy('sentOn', 'desc', this.db.getIsLite() ? 'first' : 'last')
.orderBy('createdOn', 'desc')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea why this is needed but the previous behavior doesn't work after the knex bump

@samuelmasse
Copy link
Contributor Author

samuelmasse commented Mar 10, 2022

It looks like unique constraints are not being enforced when running the tests on the ci for whatever reason...

Comment on lines +1 to 6
test('TODO: reimplement this', () => {})

/*
import { Inspector } from './utils/database'
import { startMessagingServer } from './utils/server'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm commenting out this test for now because knex-schema-inspector doesn't work with better-sqlite3. Since we're not adding migrations at the moment it's not critical that this is run. We'll add it back pretty soon. Might require implementing our own schema inspector or patching knex-schema-inspect

@samuelmasse
Copy link
Contributor Author

Note: make more foreign key tests

@samuelmasse samuelmasse reopened this Mar 10, 2022
@samuelmasse samuelmasse deleted the sm-better-sqlite3 branch March 25, 2022 01:05
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.

1 participant