9 Replies
Hello, @HAL 9000! Could you please tell more about your problem? Usually this issue occurs when you create new table, forgot to push/migrate and then run drizzle studio (I saw your comment in another issue related to studio)
@solo I sent my schema and unpushed migrations to this thread: https://discord.com/channels/1043890932593987624/1127209652694810816/1187820903963312229
@HAL 9000 I see that you have changes that are not synced with your database (you haven't run the new migrations). Then, when you run Drizzle Studio, you encounter this error: error: relation "users" does not exist. Try running all migrations, as this will apply all the changes to your database. After that, run Drizzle Studio again
I was acutally trying to push.
I thought running
push
was applying all the migrations.
here is my db.ts
and config:
I actualy need migrate.ts file. However, I don't think neon-db has migrator?
I think that was the reason I skipped migrate.ts part
I thought drizzle kit push would handle that
you should use
migrate
function to run migrations
btw, drizzle-kit push:{dialect}
lets you push your schema changes directly to the database without generating any migrations files and does not require their useok got it.
Does it help you? If not, can you tell the steps to reproduce?
so the flow is
generate migrations
and then run migrations?
yes, it should work