-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix a number of warnings and change log levels #987
Conversation
3c14180
to
2d5357d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice @joshsmith!
Just for reference, this is a really good article if you haven't seen it.
https://www.amberbit.com/blog/2017/8/3/time-zones-in-postgresql-elixir-and-phoenix/
@@ -3,7 +3,7 @@ defmodule CodeCorps.Repo.Migrations.AddStripeCustomersCardsTables do | |||
|
|||
def change do | |||
create table(:stripe_customers) do | |||
add :created, :datetime | |||
add :created, :utc_datetime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshsmith no need to replace field :created, :utc_datetime
as well in the model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I have seen done is for other models
@timestamps_opts [type: :utc_datetime] in the model file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind opening an issue for this? I'd like to migrate everything over to it specifically. We're lucky in the sense that the servers are all on UTC time by default so it shouldn't be a pain to migrate. But this is something that needs done ASAP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I'm just trying to fix compiler warnings that will always be there unless we fix old migrations. That one was from Oct 2016!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I'll open an issue.
What's in this PR?
:datetime
. I saw no harm in changing them to:utc_datetime
instead.Logger.warn
toLogger.info
in a few places