await tablesDB.createRow({
databaseId: '***',
tableId: '***',
rowId: user.$id,
data
});
why it require createdAt attribute the docs doesn't say so
data: {}
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?
no i didn't
export const UpdateThemeSchema = v.object({
Background: HexColor,
Secondary: HexColor,
FontPrimary: HexColor,
FontSecondary: HexColor,
Icons: HexColor,
Shadow: HexColor
});
this is my data Schema
let me check the database in the console maybe it get created by mistake somehow
hmm that is weird i didn't create them!
but they exist somehow
Thank you for helping
Look! Here's the exact reason behind your issue in your screenshot itself
yes it worked after i removed them
createdAt and updatedAT
but am not sure how they got created
Great! Glad your problem is solved 😊
Thank you @Devika
How exactly you created the columns for this table?
Anytime!
manually from the dashboard
Then you might've mistakenly created them. No worries. At least your issue is resolved now 👍🏻
Recommended threads
- Function running for more than 2 hours i...
This is my projectID: 669fe01b003800dd0503 Cloud functionID is 696ea05400147eb8eb3b I hope this doesn't count against my GB-hours?
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...