From 94c515a191d89ab9cf2df8ecb8b289d7c39d92e5 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Fri, 26 Jul 2024 16:43:14 +0200 Subject: [PATCH] storage: minor code simplification; re-add schema setting to postgres test config --- storage/tracking.lisp | 19 ++++++++----------- test/config-postgres.lisp | 3 ++- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/storage/tracking.lisp b/storage/tracking.lisp index 39a61a8..1c8bd86 100644 --- a/storage/tracking.lisp +++ b/storage/tracking.lisp @@ -80,17 +80,14 @@ tr)) (defun create-table (cont) - (let* - ((st (storage cont)) - (tn (table-name cont)) - (table (storage:qualified-table-name st tn)) - (head-fields (item-head-fields cont)) - (params (storage:params st)) - (id-type (getf params :id-type)) - (json-type (getf params :json-type)) - (hf-def (mapcar #'(lambda (x) - (list x :type 'text :not-null t :default '|''|)) - head-fields))) + (let* ((st (storage cont)) + (tn (table-name cont)) + (table (storage:qualified-table-name st tn)) + (params (storage:params st)) + (id-type (getf params :id-type)) + (json-type (getf params :json-type)) + (hf-def (mapcar #'(lambda (x) (list x :type 'text :not-null t :default '|''|)) + (item-head-fields cont)))) (storage:do-sql st (sxql:make-statement :create-table table (nconc diff --git a/test/config-postgres.lisp b/test/config-postgres.lisp index 86e3931..00405b9 100644 --- a/test/config-postgres.lisp +++ b/test/config-postgres.lisp @@ -19,4 +19,5 @@ (config:add :storage :class 'storage:config :setup #'storage:setup :db-type :postgres - :connect-args postgres-connect-args) + :connect-args postgres-connect-args + :options '(:schema "testing"))