import { customType } from 'drizzle-orm/pg-core';
const customText = customType<{ data: string }>{
dataType() {
return 'text';
},
toDriver(value: string): string {
return value.toLowerCase();
},
fromDriver(value: string): string {
return value.toUpperCase();
},
});
export const users = pgTable('users', {
name: customText('name'),
});