---
title: "Ishaq Bhallil (@isbhallil) | Hashnode"
description: "Ishaq Bhallil (@isbhallil) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@isbhallil"
---

@isbhallil

# Ishaq Bhallil

@isbhallil · Joined February 2025

## Comments

[here is the migration after " create\_table :users, id: :ulid do |t| t.string :name t.timestamps end "](https://hashnode.com/posts/implementing-ulids-in-ruby-on-rails-with-postgresql/65e4e52e881e844aa8696e3c/comment/67af84e3c41bea653aa89588#reply-67af85239bfa1654b6e21e51)

Reply · Article · Feb 14, 2025 · [Implementing ULIDs in Ruby on Rails with PostgreSQL](https://hashnode.com/posts/implementing-ulids-in-ruby-on-rails-with-postgresql/65e4e52e881e844aa8696e3c)

[add this forget about it #config/initializers/ulid\_primary\_key\_defaults.rb module ActiveRecord module ConnectionAdapters class TableDefinition alias\_method :original\_primary\_key, :primary\_key def primary\_key(name, type = :bigint, options) if type == :ulid && !options.key?(:default) options\[:default\] = -> { "gen\_ulid()" } end original\_primary\_key(name, type, options) end end end end](https://hashnode.com/posts/implementing-ulids-in-ruby-on-rails-with-postgresql/65e4e52e881e844aa8696e3c/comment/67af84e3c41bea653aa89588)

Comment · Article · Feb 14, 2025 · [Implementing ULIDs in Ruby on Rails with PostgreSQL](https://hashnode.com/posts/implementing-ulids-in-ruby-on-rails-with-postgresql/65e4e52e881e844aa8696e3c)
