Skip to content
  • Andrey Novikov's avatar
    e5a5cc48
    Add support for PostgreSQL `interval` datatype. · e5a5cc48
    Andrey Novikov authored
    Add support for PostgreSQL `interval` data type with conversion to
    `ActiveSupport::Duration` when loading records from database and
    serialization to ISO 8601 formatted duration string on save.
    Add support to define a column in migrations and get it in a schema dump.
    Optional column precision is supported.
    
    To use this in 6.1, you need to place the next string to your model file:
    
        attribute :duration, :interval
    
    To keep old behavior until 6.2 is released:
    
        attribute :duration, :string
    e5a5cc48
    Add support for PostgreSQL `interval` datatype.
    Andrey Novikov authored
    Add support for PostgreSQL `interval` data type with conversion to
    `ActiveSupport::Duration` when loading records from database and
    serialization to ISO 8601 formatted duration string on save.
    Add support to define a column in migrations and get it in a schema dump.
    Optional column precision is supported.
    
    To use this in 6.1, you need to place the next string to your model file:
    
        attribute :duration, :interval
    
    To keep old behavior until 6.2 is released:
    
        attribute :duration, :string
Loading