-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(postgres) ensure APIs created_at has ms precision
APIs are retrieved without an `ORDER BY` clause from the datastore when building the router. Because of the lack of such a clause in our current Cassandra schema, we wish to implement sorting by creation date in our business logic, right before building the router. However, the PostgreSQL default clause of the APIs `created_at` field is set to `CURRENT_TIMESTAMP(0)`, which strips ms precision out of the timestamp. This changes the default timestamp precision to 3 digits so our sorting attribute (`created_at`) can be meaningful. This fix is targeting 0.11.1, and as such does not introduce a new migration to update the default value of `created_at`. This fix will only have effect for new database schemas. A second commit will introduce a migration, which, as per our policy, will be targeted for 0.12.0. Fix #2899
- Loading branch information
1 parent
98c28ce
commit f3ccfc1
Showing
4 changed files
with
62 additions
and
4 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