#Medusa fails to apply migrations to postgres?

13 messages · Page 1 of 1 (latest)

pseudo jungle
#

My medusa backend fails to apply migrations to postgres. It seems like it's not applying migrations despite connecting to database.

query failed: SELECT "StagedJob"."id" AS "StagedJob_id", "StagedJob"."event_name" AS "StagedJob_event_name", "StagedJob"."data" AS "StagedJob_data" FROM "staged_job" "St
agedJob" LIMIT 1000                                                                                                                                                      
error: error: relation "staged_job" does not exist                                                   

My db monitor shows that there are no tables created despite medusa stating that database was initialized

#

Did anyone encounter that error before?

pseudo jungle
#

i have my database setup correctly (cause medusa actually connects to it, it just doesn't create any tables)

analog lagoon
#

What command did you run to apply the migrations ?

pseudo jungle
#

aren't those applied by medusajs?

#

i use pnpm start

#

and was sure that medusa applies migration

analog lagoon
#

No you have to run mirgations run

pseudo jungle
#

oh my bad then

#

did i miss it or is it not part of documentation

#

nevermind found it

#

sorry for wasting your time