Error when trying to push to supabase

I just set up a new supabase project and was trying to set up some schema, but I found I can't push more than once. The first push works fine, after that I keep getting this error on drizzle-kit push:

[⢿] Pulling schema from database...
/Users/myuser/test-project/node_modules/drizzle-kit/bin.cjs:19334
      if (column7.column_default.endsWith("[]")) {
                                 ^
TypeError: Cannot read properties of undefined (reading 'endsWith')


This is my entire schema:

export const users = pgTable("users", {
    id: serial("id").primaryKey(),
    username: text("username").notNull(),
});

export const books = pgTable("books", {
    id: serial("id").primaryKey(),
    title: text("title").notNull(),
});


Any ideas what I can try to debug the issue? I found that if I only have 1 table, pushing is fine and I can keep updating the schema for that table and pushing it, but with more than one table in the db/schema, I get the above error.
Was this page helpful?