Skip to content
Snippets Groups Projects
Commit 9ac8b433 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

when we create a new Database let's call sync-tables.

parent 91c767e7
Branches
Tags
No related merge requests found
......@@ -25,7 +25,11 @@
(require-params org name engine details)
(check (contains? (set (map first driver/available-drivers)) engine) [400 "Invalid engine type specified."])
(check-403 (org-can-write org))
(ins Database :organization_id org :name name :engine engine :details details))
(let-500 [new-db (ins Database :organization_id org :name name :engine engine :details details)]
;; kick off background job to gather schema metadata about our new db
(future (driver/sync-tables new-db))
;; make sure we return the newly created db object
new-db))
(defendpoint GET "/form_input" []
{:timezones metabase.models.common/timezones
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment