-
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! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello. Schema options is not exposed to typescript api yet. |
Beta Was this translation helpful? Give feedback.
-
This is fixed in version 4.4.2 |
Beta Was this translation helpful? Give feedback.
-
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()') |
Beta Was this translation helpful? Give feedback.
This is fixed in version 4.4.2