diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-07-26T19·33-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-07-28T00·32+0000 |
commit | 14c4ed99e1d1b593dc802f13f0d9287c235ff466 (patch) | |
tree | 442688de94f80fe69cc8fcb6e3894f8fa8c9a245 /web/panettone/src/packages.lisp | |
parent | 82ba28f1976305c1163adb5993745604ccb696cc (diff) |
feat(panettone): Use postgres as the storage backend r/1497
Switch from cl-prevalence to postgres (via postmodern) as the storage backend for panettone. The first time the application starts up after this commit, it will (idempotently) initialize the db schema and migrate over all data from the prevalence snapshot to the database - the plan is then to get rid of the prevalence classes and dependency once that's deployed. Change-Id: I4f35707efead67d8854f1c224ef67f8471620453 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1467 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: eta <eta@theta.eu.org>
Diffstat (limited to 'web/panettone/src/packages.lisp')
-rw-r--r-- | web/panettone/src/packages.lisp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/web/panettone/src/packages.lisp b/web/panettone/src/packages.lisp index 8ebf528cca70..169d8833a7bd 100644 --- a/web/panettone/src/packages.lisp +++ b/web/panettone/src/packages.lisp @@ -1,10 +1,36 @@ +(defpackage panettone.util + (:use :cl :klatre) + (:import-from :alexandria :when-let) + (:export :integer-env)) + (defpackage panettone.css (:use :cl :lass) (:export :styles)) +(defpackage panettone.model + (:nicknames :model) + (:use :cl :panettone.util :klatre :postmodern) + (:import-from :alexandria :if-let :define-constant) + (:export + :connect-postgres :ddl/init + + :issue + :issue-comment + :id :subject :body :author-dn :issue-id :status :created-at + + :get-issue :issue-exists-p :list-issues :create-issue :set-issue-status + :delete-issue + + :issue-comments :num-comments :create-issue-comment)) + (defpackage panettone - (:use :cl :klatre :easy-routes) + (:use :cl :panettone.util :klatre :easy-routes :iterate) (:import-from :cl-prevalence :get-id) (:import-from :defclass-std :defclass/std) (:import-from :alexandria :if-let :when-let) + (:import-from + :panettone.model + :id :subject :body :author-dn :issue-id :status :created-at + :issue-comments :num-comments) + (:shadow :next) (:export :start-pannetone :config :main)) |