Skip to content

Instantly share code, notes, and snippets.

@will
Created February 17, 2016 18:31
Show Gist options
  • Select an option

  • Save will/dc5c29df31a929d69668 to your computer and use it in GitHub Desktop.

Select an option

Save will/dc5c29df31a929d69668 to your computer and use it in GitHub Desktop.

Revisions

  1. will created this gist Feb 17, 2016.
    7 changes: 7 additions & 0 deletions postgres_types.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # config/initializers/postgres_types.rb
    ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES.tap do |t|
    t[:primary_key] = "bigserial primary key"
    t[:datetime] = "timestamptz"
    t[:timestamp] = "timestamptz"
    t[:string] = "text"
    end