DB wont setup
Man, anyone got some tips for getting my db up and running again. wasp db migrate-dev just hangs.
20 Replies
Hi @Guerilla. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry to hear that you're having trouble with setting up your database using
wasp db migrate-dev
. Here are a few steps you can try based on the information from the knowledge sources:
1. Check the output: If there's any output before it hangs, it might include clues as to why it's hanging. For example, it might be waiting for a prompt.
2. Try building the SDK directly: If it hangs during the "Building SDK" stage, you can try to build the SDK directly. Here's how you can do it:
3. Interrupt the hanging command: If you can't Ctrl+C wasp db migrate-dev
because it stops reading your input, you can still interrupt it by sending the Ctrl+C signal from a different terminal. Here's how:
At this point, use any of the terminals to execute npx tsc
in .wasp/out/sdk/wasp
.
If none of these steps work, there might be an issue with the Wasp framework itself. In that case, you might want to report the issue on the Wasp Github page (https://github.com/wasp-lang/wasp/issues).
Please note that these steps are based on the information from the knowledge sources (https://discord.com/channels/686873244791210014/1217483832404611195) and might not solve your specific issue. If you're still having trouble, I recommend reaching out to the Wasp community for more specific help.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Guerilla, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?(base) β app git:(master) β wasp db migrate-dev
π --- Compiling wasp project... --------------------------------------------------
β
--- Successfully completed npm install. ----------------------------------------
π --- Setting up database... -----------------------------------------------------
It hangs here, should i delete the db entirely?
What kind of DB are you using, Postgres or Sqlite?
Are you running the DB with the
wasp start db
?Postgres, and no - I am managing the DB myself as I have other psql dbs running :).
Fedora 37
0.13.2 wasp
psql 14.9
You've setup the
DATABASE_URL
in the .env.server
correctly? With the host, username, pw and the db name?I had an issue with the schema possibly, so it asked me if I wanted to lose all my data etc..
Wohooo @Guerilla, you just became a Waspeteer level 1!
So I said yes
IMHO if you can, drop the DB and delete the
migrations
folder and run wasp clean
to clean up. Then see if it works with a clean startOk, will it create the DB or no
When its not managed
It won't create the DB if I recall correctly π that's something @sodic discovered since he manages his DBs on Linux as well
I'll let him chime in when he can, but try creating a DB and let's see what happens
ERROR: database "wasp_recipes" is being accessed by other users
DETAIL: There are X other sessions using the database.
postgres=#
Hmm. Thats probably the problem lmao
LMfao.. yeeeerp
Sorry, there was 25 Idk why I blanked that one out. Thanks π
there was 25 Idk why I blanked that one out.25 active sessions? I didn't quite get this π I'm glad it worked out
It will by default, unless you do something weird with jobs.
We have an edge case that manifests in some apps (e.g. Open Saas), but by design, Wasp should create a misaing database.
So of that doesn't happen, please give us more details π
Yeah, im using Open Saas π