Skip to content

Adding citext support. #678

Description

@ringzhz

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions