I think this should not be specific for `uuid`. You can do the same as https://github.com/rails/rails/blob/ccdea7bc83417e9b9ee4843976fff93c5c7cee32/activerecord/lib/active_record/connection_adapters/postgresql/column.rb#L123