import orange from 'orange-orm';
import { env } from '$env/dynamic/private';
const map = orange.map((x) => ({
tag: x.table('tag').map(({ column }) => ({
id: column('id').numeric().primary().notNullExceptInsert(),
name: column('name').string(),
createdAt: column('createdAt').dateWithTimeZone().default('now()'),
updatedAt: column('updatedAt').dateWithTimeZone().default('now()').notNullExceptInsert()
}))
}));
export const db = map.postgres(env.DATABASE_URL + '?search_path=custom');If I create the table in Thanks! |
Answered by
lroal
Nov 21, 2024
Replies: 3 comments 1 reply
|
Hello. Schema options is not exposed to typescript api yet. |
1 reply
|
This is fixed in version 4.4.2 |
0 replies
Answer selected by
lroal
|
By the way, I see that you are using Maybe I should have another way of adding sql specific to the default value. .defaultInSql('now()') |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is fixed in version 4.4.2