Can't figure out what I'm missing here. I've got two tables made. I'm using Drizzle ORM, and I'm try

Can't figure out what I'm missing here. I've got two tables made. I'm using Drizzle ORM, and I'm trying to run some queries. But I get D1_ERROR: no such table: inventory.

Any ideas where I might be going wrong? The statement it's trying to run is:

{
  sql: 'delete from "inventory" where ("inventory"."user_id" = ? and "inventory"."skin_id" not in (?, ?, ?, ?))',
  params: [
    '38891062',
    '9fa5664e-45fa-2a52-68e4-db97d85c8a91',
    '7e323e82-44b6-1711-2028-10af32c632d5',
    '19ba907b-4a76-347f-ea24-38990c9ff755',
    '7b71fc11-4fa2-c84c-31ec-5eb5c3e3fff3'
  ]
}


Creating the DB instance with:

  if (!env.DB) {
    throw new Error("Database connection not found");
  }
  const db = drizzle(env.DB, {
    schema,
    logger: true,
  });
Screenshot_2024-03-22_at_2.34.19_PM.png
Was this page helpful?