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

Cater for new local D1 database location #53

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

dan-gamble
Copy link
Contributor

Fixes #52

@jplhomer jplhomer self-requested a review June 21, 2023 11:47
@mileszim
Copy link

@jplhomer can we get this merged in?

.tool-versions Outdated
@@ -0,0 +1 @@
nodejs 16.16.0

Choose a reason for hiding this comment

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

@dan-gamble might be worth getting rid of this

Copy link
Owner

@jplhomer jplhomer left a comment

Choose a reason for hiding this comment

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

For sure - @dan-gamble mind running pnpm run changeset and add a changeset so it triggers a release? It can be a minor release probably.

@stretch07
Copy link

@jplhomer can you merge this pls 🥺

superflare is literally awesome, I have yet to find anything like it to fit my needs ❤️

@dan-gamble
Copy link
Contributor Author

@jplhomer I can't find any changeset scripts in the package JSON's? Am I being blind? 😅

@jplhomer
Copy link
Owner

jplhomer commented Dec 15, 2023

@dan-gamble haha nope, my bad. Just npx changeset - I went ahead and added it. I'll update the repo with contrib instructions soon.

@jplhomer jplhomer merged commit aaebb5b into jplhomer:main Dec 15, 2023
1 check passed
@jplhomer
Copy link
Owner

I'm getting DB Not found failures after this now 😢

@dan-gamble
Copy link
Contributor Author

Tonight/this weekend I'll try spin up a new superflare app and see if I get that. If I do I'll try and work out what it was. Wrangler may have changed between when this was done and now

@dan-gamble
Copy link
Contributor Author

image

Yea, it's super different now 🤔

@jplhomer
Copy link
Owner

Yeah... When I tried npx wrangler d1 create <name>, it created it in the path that Superflare used to think... but in addition to what was already set up with those three individual files? Very odd.

@dan-gamble
Copy link
Contributor Author

I can see how the paths get created but I can't find a great deal on how the name/key for the DB is generated.

The only thing I could think to do at the moment is look for [state, v3, d1, miniflare-D1DatabaseObject] then just find the file that is just .sqlite. Doesn't feel great and I think if you had multiple D1 databases it'd like just put them all in this folder with different ID's so it's incredibly fragile

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.

Cannot open database because the directory doesn't exist
4 participants