-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notes: use utc timestamp in db and use indian time on application layer
- Loading branch information
1 parent
5503ea2
commit 3d2d6d2
Showing
8 changed files
with
102 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
defmodule Accumulator.Repo.Migrations.NotesTimezone do | ||
use Ecto.Migration | ||
|
||
def change do | ||
alter table(:workspaces) do | ||
modify(:inserted_at, :utc_datetime) | ||
modify(:updated_at, :utc_datetime) | ||
end | ||
|
||
alter table(:notes) do | ||
modify(:inserted_at, :utc_datetime) | ||
modify(:updated_at, :utc_datetime) | ||
end | ||
end | ||
|
||
def down() do | ||
alter table(:workspaces) do | ||
modify(:inserted_at, :naive_datetime) | ||
modify(:updated_at, :naive_datetime) | ||
end | ||
|
||
alter table(:notes) do | ||
modify(:inserted_at, :naive_datetime) | ||
modify(:updated_at, :naive_datetime) | ||
end | ||
end | ||
end |