୧ʕ•̀ᴥ•́ʔ୨
୧ʕ•̀ᴥ•́ʔ୨
DTDrizzle Team
Created by ୧ʕ•̀ᴥ•́ʔ୨ on 9/23/2024 in #help
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')
[⢿] 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(),
});
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.
12 replies