Rank 1: Thread
await tablesDB.createRow({
databaseId: '***',
tableId: '***',
rowId: user.$id,
data
});
why it require createdAt attribute the docs doesn't say so
Votes
0
Replies
24
Participants
2
Messages
25
Rank 1: Thread
await tablesDB.createRow({
databaseId: '***',
tableId: '***',
rowId: user.$id,
data
});
why it require createdAt attribute the docs doesn't say so
data: {}
Rank 1: Thread
export const UpdateTheme = command(UpdateThemeSchema, async (data) => {
const user = RequireAuth();
const { tablesDB } = getAdminServices();
try {
await tablesDB.upsertRow({
databaseId,
tableId: 'theme',
rowId: user.$id,
data
});
} catch (error) {
console.log(error);
}
});
am passing it correctly
The createdAt is a default column which automatically gets created when you create any DB Table. Have you explicitly created any similar column and mentioned it as required somewhere in your code?
Rank 1: Thread
no i didn't
Rank 1: Thread
export const UpdateThemeSchema = v.object({
Background: HexColor,
Secondary: HexColor,
FontPrimary: HexColor,
FontSecondary: HexColor,
Icons: HexColor,
Shadow: HexColor
});
Rank 1: Thread
this is my data Schema
Rank 1: Thread
let me check the database in the console maybe it get created by mistake somehow
Rank 1: Thread
Rank 1: Thread
hmm that is weird i didn't create them!
Rank 1: Thread
but they exist somehow
Rank 1: Thread
Thank you for helping
Look! Here's the exact reason behind your issue in your screenshot itself
Rank 1: Thread
yes it worked after i removed them
Rank 1: Thread
createdAt and updatedAT
Rank 1: Thread
but am not sure how they got created
Great! Glad your problem is solved 😊
Rank 1: Thread
Thank you @Devika
How exactly you created the columns for this table?
Anytime!
Rank 1: Thread
manually from the dashboard
Then you might've mistakenly created them. No worries. At least your issue is resolved now 👍🏻
Rank 2: Process
yes probably i did something wrong that lead to creation of them
Rank 2: Process
thank you
Please mark this post as SOLVED since your issue is resolved now