Open Collective
Open Collective
Loading
[email protected]
Published on January 21, 2023 by Oleksandr Blokh

Added support for Postgres.js driver, docs - https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm-pg/src/postgres.js/README.md

PostgreSQL module: 
Added possibility to define database custom data types Example usage: 
  1. const customText = customType<{ data: string }>({
        dataType() {
            return 'text';
        },
    });
    
    const usersTable = pgTable('users', {
        name: customText('name').notNull(),
    });
For more examples please check https://github.com/drizzle-team/drizzle-orm/blob/main/docs/custom-types.lite.md

MySQL module:
Added possibility to define database custom data types Example usage: 
  1. const customText = customType<{ data: string }>({
          dataType() {
        return 'text';
          },
    });
    
    const usersTable = mysqlTable('users', {
        name: customText('name').notNull(),
    });