sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

Adding `citext` support.

Open ringzhz opened this issue 4 months ago • 0 comments

Hi,

My project uses the citext plugin of postgres and I'd love to add support for it. I have it working with my local DB with this simple change:

dave@zecarbon:~/ws/sequelize-auto$ git diff
diff --git a/src/auto-generator.ts b/src/auto-generator.ts
index 9d3b425..dd96730 100644
--- a/src/auto-generator.ts
+++ b/src/auto-generator.ts
@@ -807,7 +807,7 @@ export class AutoGenerator {
   }
 
   private isString(fieldType: string): boolean {
-    return /^(char|nchar|string|varying|varchar|nvarchar|text|longtext|mediumtext|tinytext|ntext|uuid|uniqueidentifier|date|time|inet|cidr|macaddr)/.test(fieldType);
+    return /^(char|nchar|string|varying|varchar|nvarchar|text|longtext|mediumtext|tinytext|ntext|uuid|uniqueidentifier|date|time|inet|cidr|macaddr|citext)/.test(fieldType);
   }
 
   private isArray(fieldType: string): boolean {

Would it be possible to add this?

ringzhz avatar Jun 24 '25 13:06 ringzhz