Migrates back to datomic on-prem

This commit is contained in:
2023-04-29 07:12:51 -07:00
parent aca8f7c92c
commit b2ad7790cf
88 changed files with 2289 additions and 2286 deletions

View File

@@ -1,5 +1,5 @@
(ns auto-ap.integration.util
(:require [datomic.client.api :as dc]
(:require [datomic.api :as dc]
[auto-ap.datomic :refer [client conn transact-schema]]
[clj-time.core :as time]))
@@ -102,16 +102,16 @@
(dissoc x :id))
(defn setup-test-data [data]
(:tempids (dc/transact conn {:tx-data (into data
[(test-account :db/id "test-account-id")
(test-client :db/id "test-client-id"
:client/bank-accounts [(test-bank-account :db/id "test-bank-account-id")])
(test-vendor :db/id "test-vendor-id")
{:db/id "accounts-payable-id"
:account/name "Accounts Payable"
:db/ident :account/accounts-payable
:account/numeric-code 21000
:account/account-set "default"}])})))
(:tempids (dc/transact conn (into data
[(test-account :db/id "test-account-id")
(test-client :db/id "test-client-id"
:client/bank-accounts [(test-bank-account :db/id "test-bank-account-id")])
(test-vendor :db/id "test-vendor-id")
{:db/id "accounts-payable-id"
:account/name "Accounts Payable"
:db/ident :account/accounts-payable
:account/numeric-code 21000
:account/account-set "default"}]))))
(defn apply-tx [data]
(:db-after (dc/transact conn {:tx-data data})))
(:db-after (dc/transact conn data)))