Skip to content

Commit

Permalink
fix(postgres) migration for APIs created_at default precision
Browse files Browse the repository at this point in the history
Follow-up commit to 5cb196c

This migration is targeted for landing in 0.12.0, and will ensure that
newly created APIs will have a `created_at` field with ms precision.

From #2925
  • Loading branch information
thibaultcha committed Jan 16, 2018
1 parent 2161caa commit 744b6c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kong/dao/migrations/postgres.lua
Original file line number Diff line number Diff line change
Expand Up @@ -533,4 +533,13 @@ return {
]],
down = function(_, _, dao) end -- not implemented
},
{
name = "2017-10-02-173400_apis_created_at_ms_precision",
up = [[
ALTER TABLE apis ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP(3);
]],
down = [[
ALTER TABLE apis ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP(0);
]]
},
}

0 comments on commit 744b6c2

Please sign in to comment.