Genio
Genio
DTDrizzle Team
Created by migs on 6/14/2024 in #help
TypeError: Cannot read properties of undefined (reading 'columns') - SQLite TursoDB
then run db:generate to generate the sql equivalent
8 replies
DTDrizzle Team
Created by migs on 6/14/2024 in #help
TypeError: Cannot read properties of undefined (reading 'columns') - SQLite TursoDB
my current work around it to type everything in schema file
8 replies
DTDrizzle Team
Created by migs on 6/14/2024 in #help
TypeError: Cannot read properties of undefined (reading 'columns') - SQLite TursoDB
ah okay
8 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
i lost ur thread, can you ping me
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
Maybe this is why its causing the issue ? I am still defining the relations in my schema, will test tomorrow if it works
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
No description
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
take a look at this
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
if you do references, you need to also define the relation
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
but
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
its not documented
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
i found out
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
however, after pushing. When i uncommented the references. I keep getting the same error
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
i removed mine nad it worked
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
good catch that you found out it was the references
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
@migs same issue as you apparently
17 replies
DTDrizzle Team
Created by Genio on 6/24/2024 in #help
[ERROR] TypeError: Cannot read properties of undefined (reading 'toString')
Schema
export const Profile = createTable("profile", {
// Matches id from auth.users table in Supabase
id: uuid("id")
.primaryKey()
.references(() => Users.id, { onDelete: "cascade" }),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
createdAt: timestamp("created_at").notNull().defaultNow(),
firstName: varchar("first_name"),
lastName: varchar("last_name"),
mobileNumber: varchar("mobile_number"),
location: varchar("location"),
// gender: genderEnum('gender').default('unknown'),
// role: roleEnum('role').default('user'),
otpCode: text("otpCode"),
});


export const Events = createTable("events", {
id: uuid("id").primaryKey(),
owner: uuid("owner").references(() => Users.id),
eventName: varchar("event_name"),
eventLocation: varchar("event_location"),
eventDate: timestamp("event_date"),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
createdAt: timestamp("created_at").notNull().defaultNow(),
qrHash: varchar("qr_hash"),
qrDesignUrl: text("qr_design_url"),
cardDesignUrl: text("card_design_url"),
})


export const EventAttendees = createTable("event_attendees", {
id: uuid("id").primaryKey(),
eventId: uuid("event_id").references(() => Events.id),
name: varchar("name"),
number: varchar("number"),
status: varchar("status"),
reply: varchar("reply"),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
createdAt: timestamp("created_at").notNull().defaultNow(),
})
export const Profile = createTable("profile", {
// Matches id from auth.users table in Supabase
id: uuid("id")
.primaryKey()
.references(() => Users.id, { onDelete: "cascade" }),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
createdAt: timestamp("created_at").notNull().defaultNow(),
firstName: varchar("first_name"),
lastName: varchar("last_name"),
mobileNumber: varchar("mobile_number"),
location: varchar("location"),
// gender: genderEnum('gender').default('unknown'),
// role: roleEnum('role').default('user'),
otpCode: text("otpCode"),
});


export const Events = createTable("events", {
id: uuid("id").primaryKey(),
owner: uuid("owner").references(() => Users.id),
eventName: varchar("event_name"),
eventLocation: varchar("event_location"),
eventDate: timestamp("event_date"),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
createdAt: timestamp("created_at").notNull().defaultNow(),
qrHash: varchar("qr_hash"),
qrDesignUrl: text("qr_design_url"),
cardDesignUrl: text("card_design_url"),
})


export const EventAttendees = createTable("event_attendees", {
id: uuid("id").primaryKey(),
eventId: uuid("event_id").references(() => Events.id),
name: varchar("name"),
number: varchar("number"),
status: varchar("status"),
reply: varchar("reply"),
updatedAt: timestamp("updated_at").notNull().defaultNow(),
createdAt: timestamp("created_at").notNull().defaultNow(),
})
17 replies