-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use timestamps with timezone when set as the default for postgresql. #668
Comments
Yep, I don't foresee any problems with your configuration. I would expect GoodJob's migration to pick up the base configuration. GoodJob is not doing anything special with ActiveRecord. |
Oh, also thank you for flagging the inconsistency of timestamp vs datetime. They should be functionally equivalent and is just an inconsistent oversight on my part. |
@thomasdziedzic I wanted to follow-up. Are you successful in creating GoodJob timestamps with timezones? |
@bensheldon I can confirm that I've been successfully using timestamps with timezones on the good_job tables. |
I have the following in
config/initializers/active_record.rb
:As documented in https://guides.rubyonrails.org/configuring.html#activerecord-connectionadapters-postgresqladapter-datetime-type which sets the default to use
timestamp with time zone
.When I installed good_job with
bin/rails g good_job:install
and ranbin/rails db:migrate
it used timestamps without a timezone for the good_job fields and a datetime for the created_at and updated_at columns:I am trying to use timestamps with timezones throughout my application, so I was wondering:
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.datetime_type
to generate the good_job migration?The text was updated successfully, but these errors were encountered: