Skip to content

Fallback to sql_type when type is nil #10

Description

@gonzoyumo

When using some DB specific data type that rails doesn't know, Model's column type is nil.
But there's also an attribute called sql_stype which could be used as fallback when type is unknown.

Here is a sample model column using a PG custom TYPE:

#<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x007f875a33c2d0 
  @name="notification_frequency", 
  @sql_type="users_notification_frequencies", 
  @null=false,
  @limit=nil,
  @precision=nil,
  @scale=nil,
  @type=nil,
  @default="weekly",
  @primary=false,
  @coder=nil
>

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions