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
- My projects were deleted
Hello everyone, My projects were for some reason deleted. I got an email informing me about project inactivity, when I clicked to activate it again, it was sil...
- Dotnet functions on cloud
I'm trying to deploy my .Net8 functions to my project on cloud.appwrite through the CLI. I'm getting this error.
- All projects deleted
Hello, from the appwrite console last week I re-activated some of my old project and published them, yesterday I checked and none of the apps were working, now ...