Back to Drizzle Orm

0.16.2

changelogs/drizzle-orm-pg/0.16.2.md

0.45.2378 B
Original Source
  • Add possibility to define database custom data types

Example usage:

typescript
const customText = customType<{ data: string }>({
	dataType() {
		return 'text';
	},
});

const usersTable = pgTable('users', {
	name: customText('name').notNull(),
});

For more examples please check docs