Table doesnt exist #491
-
Hi, is there any docs on Drizzle connection. Ive generated the tables with drizzle-kit generate:mysql and set up connection with
but Im getting error: DatabaseError: target: fakeep.-.primary: vttablet: rpc error: code = NotFound desc = Table 'fakeep.notes' doesn't exist (errno 1146) (sqlstate 42S02) (CallerID: gabf7y9fxht8uoa2me3q): Sql: "select id, content, completed, created_at, user_id from notes", BindVars: {REDACTED}. Db name is fakeep and table is notes. Im not sure if it's trying to connect to a table named "fakeep.notes". If anyone cares to take a look: Thank you!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I answered your support ticket but for anyone else stumbling on to this, that error is correctly saying the table drizzle-kit generate:mysql will create migration files for you, but you'll have to run those migrations against the database before using the new tables: See https://orm.drizzle.team/kit-docs/overview#running-migrations |
Beta Was this translation helpful? Give feedback.
I answered your support ticket but for anyone else stumbling on to this, that error is correctly saying the table
notes
doesn't currently exist in the database.fakeep.notes
is the samenotes
table in<database-name>.<table-name>
format.drizzle-kit generate:mysql will create migration files for you, but you'll have to run those migrations against the database before using the new tables:
See https://orm.drizzle.team/kit-docs/overview#running-migrations