Hmm, seems like careless use of `constant_sql_override` could change the 
output/effect of old migrations? For example, if a migration sets a column 
default of CURRENT_TIMESTAMP, and then later the constant sql is set to 
"CURRENT_TIMESTAMP AT TIME ZONE 'UTC'", then development/production 
databases could have columns with differing default values?

Thing to be aware of, I suppose.


On Monday, October 1, 2018 at 10:28:42 AM UTC-4, Jeremy Evans wrote:
>
> Sequel 5.13.0 has been released!
>
> = New Features
>
> * A constant_sql_override Database extension has been added, allowing
>   for overriding the SQL used by constants such as
>   Sequel::CURRENT_TIMESTAMP.  This can be used to force
>   CURRENT_TIMESTAMP to be literalized at a particular time zone:
>
>     DB.extension :constant_sql_override
>     DB.set_constant_sql(Sequel::CURRENT_TIMESTAMP,
>       "CURRENT_TIMESTAMP AT TIME ZONE 'UTC'")
>
> * Prepared statements now support the :single_value type, which
>   returns the first column value in the dataset.
>
>     prep_stmt = DB[:table].select(:column).prepare(:single_value, :ps)
>     prep_stmt.call
>     # PREPARE ps AS SELECT column FROM table LIMIT 1;
>     # EXECUTE ps;
>     # => 42
>
> = Other Improvements
>
> * Dataset#from_self will no longer use a cached dataset if any options
>   are given, as that can result in incorrect behavior.
>
> * Model.all in the static_cache plugin now accepts a block, mirroring
>   the API when the static_cache plugin is not used.
>
> Thanks,
> Jeremy
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to