MahmoodKhalil
MahmoodKhalil
Explore posts from servers
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
@Mario564 https://github.com/MahmoodKhalil57/drizzlekiterror 1.
git clone https://github.com/MahmoodKhalil57/drizzlekiterror.git
git clone https://github.com/MahmoodKhalil57/drizzlekiterror.git
2. add .env
DATABASE_URL="postgresql://postgres.[SECRET]/postgres"
DATABASE_URL="postgresql://postgres.[SECRET]/postgres"
3.
pnpm i
pnpm i
4.
pnpm drizzle-kit push
pnpm drizzle-kit push
5. then again
pnpm drizzle-kit push
pnpm drizzle-kit push
second time should throw an error
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
@Mario564 let me know if you are still investigating and need help reproducing, I can make a quick repo if that would help Personally my issue is fixed and I dont need any help
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
When I connected the way mentioned here, it works just fine
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
this seems to have issues at this point
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
I was connecting to the db using this method https://orm.drizzle.team/docs/get-started-postgresql#supabase
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
@Mario564 sorry for the trouble, I think I fixed it
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
I am using the latest "drizzle-kit": "^0.24.1", "drizzle-orm": "^0.33.0",
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
for context, I am using lucia and I got it from here https://lucia-auth.com/database/drizzle#postgresql
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
Thanks a lot in advanced this is the schema.ts
import { pgTable, boolean, text, timestamp, serial } from "drizzle-orm/pg-core";

export const userTable = pgTable("user", {
id: text("id").primaryKey(),
username: text("username").notNull().unique(),
firstName: text("first_name").notNull(),
lastName: text("last_name").notNull(),
email: text("email").notNull().unique(),
profilePicture: text("profile_picture"),
is_verified: boolean("is_verified").notNull().default(false),
is_admin: boolean("is_admin").notNull().default(false),
});

export const sessionTable = pgTable("session", {
id: text("id").primaryKey(),
userId: text("user_id")
.notNull()
.references(() => userTable.id),
expiresAt: timestamp("expires_at", {
withTimezone: true,
mode: "date",
}).notNull(),
active: boolean("active").notNull().default(true),
});
import { pgTable, boolean, text, timestamp, serial } from "drizzle-orm/pg-core";

export const userTable = pgTable("user", {
id: text("id").primaryKey(),
username: text("username").notNull().unique(),
firstName: text("first_name").notNull(),
lastName: text("last_name").notNull(),
email: text("email").notNull().unique(),
profilePicture: text("profile_picture"),
is_verified: boolean("is_verified").notNull().default(false),
is_admin: boolean("is_admin").notNull().default(false),
});

export const sessionTable = pgTable("session", {
id: text("id").primaryKey(),
userId: text("user_id")
.notNull()
.references(() => userTable.id),
expiresAt: timestamp("expires_at", {
withTimezone: true,
mode: "date",
}).notNull(),
active: boolean("active").notNull().default(true),
});
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
Hello, can someone please assist with this bug
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
doesnt anyone know what this means? "TypeError: Cannot read properties of undefined (reading 'toLowerCase')"
21 replies
DTDrizzle Team
Created by MahmoodKhalil on 8/24/2024 in #help
Cannot push postgres
this is me running "pnpm drizzle-kit push" directly after the first time
root@f2771f2cc095:/app# pnpm drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/app/drizzle.config.ts'
Using 'postgres' driver for database querying
[⢿] Pulling schema from database...
/app/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:18976
const onUpdate = fk4.update_rule.toLowerCase();
^

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at /app/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:18976:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.16.0
root@f2771f2cc095:/app# pnpm drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '/app/drizzle.config.ts'
Using 'postgres' driver for database querying
[⢿] Pulling schema from database...
/app/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:18976
const onUpdate = fk4.update_rule.toLowerCase();
^

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at /app/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:18976:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.16.0
21 replies