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

Support Sqlite3 too #33

Closed
adelowo opened this issue Feb 18, 2024 · 8 comments
Closed

Support Sqlite3 too #33

adelowo opened this issue Feb 18, 2024 · 8 comments

Comments

@adelowo
Copy link
Collaborator

adelowo commented Feb 18, 2024

Currently have a hard dependency on Postgres but it will be great to allow people quickly run this with sqlite

@adelowo
Copy link
Collaborator Author

adelowo commented Feb 18, 2024

Probably just switch out the database layer to sqlc or something

@oneEyedSunday
Copy link
Contributor

I see that bun supports a sqlite dialect (https://github.com/uptrace/bun/tree/master/dialect/sqlitedialect)

I did a small poc here oneEyedSunday@4fe853a

I do think it may be unnecessary to flesh out the repository (e.g https://github.com/oneEyedSunday/sdump/blob/main/datastore/postgres/user.go) for sqllite since it has bun support.

Will run this end to end just to be sure.

@adelowo
Copy link
Collaborator Author

adelowo commented Sep 27, 2024

I see that bun supports a sqlite dialect (https://github.com/uptrace/bun/tree/master/dialect/sqlitedialect)

I did a small poc here oneEyedSunday@4fe853a

I do think it may be unnecessary to flesh out the repository (e.g https://github.com/oneEyedSunday/sdump/blob/main/datastore/postgres/user.go) for sqllite since it has bun support.

Will run this end to end just to be sure.

Looks good to me. Thanks for the work.

Happy to merge this in if you make a PR. Just a few comments I think I'd love to be fixed just from quickly scanning on mobile

@oneEyedSunday
Copy link
Contributor

So I've made a PR on #37
I have to run it all locally and perhaps also with the migrations to see if its all ok.

@oneEyedSunday
Copy link
Contributor

oneEyedSunday commented Oct 7, 2024

I've run this, and there's a little problem with the uuid extension on SQLite.

SQLite fails while running the fixtures, on

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

Installing the uuid extension on SQLite should let us keep the same fixtures.

Maybe this will help me setup locally https://github.com/manufaktor/articles/blob/main/using-uuid-in-sqlite.md

@adelowo
Copy link
Collaborator Author

adelowo commented Oct 10, 2024

True. SQLite doesn't have extensions. If this solution works then that's fine. We can use that.

I will take a look on Saturday at the PR. Apologies for late response

@oneEyedSunday
Copy link
Contributor

True. SQLite doesn't have extensions. If this solution works then that's fine. We can use that.

I will take a look on Saturday at the PR. Apologies for late response

no worries man.

@adelowo
Copy link
Collaborator Author

adelowo commented Oct 16, 2024

fixed by #37

@adelowo adelowo closed this as completed Oct 16, 2024
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

No branches or pull requests

2 participants