Krimax
Krimax
DTDrizzle Team
Created by Krimax on 1/21/2025 in #help
Nullable field cannot be inserted or updated
If you don't have such a problem, please upload your package versions
8 replies
DTDrizzle Team
Created by Krimax on 1/21/2025 in #help
Nullable field cannot be inserted or updated
Yes the above is my config. I did everything that was offered in that issue on github
8 replies
DTDrizzle Team
Created by Krimax on 1/21/2025 in #help
Nullable field cannot be inserted or updated
who solved this problem?
8 replies
DTDrizzle Team
Created by Krimax on 1/21/2025 in #help
Nullable field cannot be inserted or updated
my tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"target": "ES2021",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": false,
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false
}
}
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"target": "ES2021",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"skipLibCheck": true,
"strictNullChecks": false,
"noImplicitAny": false,
"strictBindCallApply": false,
"forceConsistentCasingInFileNames": false,
"noFallthroughCasesInSwitch": false
}
}
8 replies
DTDrizzle Team
Created by Krimax on 1/21/2025 in #help
Nullable field cannot be inserted or updated
I found a closed issue that seems to relate directly to my problem https://github.com/drizzle-team/drizzle-orm/issues/2654
8 replies
DTDrizzle Team
Created by Krimax on 1/21/2025 in #help
Nullable field cannot be inserted or updated
user.schema.ts
export const users = pgTable('users', {
id: integer().primaryKey().generatedAlwaysAsIdentity(),
discordId: text('discordId').notNull().unique(),
});

export const usersRelations = relations(users, ({ one, many }) => ({
channels: many(channels),
userChannelSettings: one(userChannelSettings),
}));
export const users = pgTable('users', {
id: integer().primaryKey().generatedAlwaysAsIdentity(),
discordId: text('discordId').notNull().unique(),
});

export const usersRelations = relations(users, ({ one, many }) => ({
channels: many(channels),
userChannelSettings: one(userChannelSettings),
}));
8 replies