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
- @napi-rs/canvas in Cloud Function
Has anyone tried rendering images using [@napi-rs/canvas](https://www.npmjs.com/package/@napi-rs/canvas) in Appwrite Functions? I've got a Bun runtime setup for...
- Rate limit
How do I solve "Signup Failed, Rate limit for the current endpoint has been exceeded. Please try again after some time"? I have Pro and around 2k requests per ...
- Type 'Theme' does not satisfy the constr...
Type 'Theme' does not satisfy the constraint 'Row'. Type 'Theme' is missing the following properties from type 'Row': $id, $sequence, $tableId, $databaseId, a...