@saasicat/adapter-drizzle 1.0.0-rc.2 → 1.0.0-rc.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,24 @@
1
1
  # @saasicat/adapter-drizzle
2
2
 
3
+ ## What this is
4
+
3
5
  The Drizzle + PostgreSQL persistence adapter for SaaSiCat. Same ports, same
4
6
  canonical schema and the same executable contract as
5
7
  `@saasicat/adapter-prisma` — `@saasicat/persistence-testing` runs the
6
8
  identical suite against both adapters in CI, which is what makes "swap the
7
9
  ORM, keep the guarantees" a verified claim.
8
10
 
11
+ ## What this is not
12
+
13
+ Not a drop-in equal of `@saasicat/adapter-prisma`. It implements the core
14
+ persistence slices — plans, plan versions, subscriptions, audit, MFA, promo
15
+ codes and their redemptions — and the contract suite marks what is missing as
16
+ skipped rather than passing. Check the shipped-adapter table below before
17
+ choosing it for a deployment that needs the whole surface.
18
+
19
+ Not a schema owner either: the tables come from `@saasicat/spec`, and your
20
+ Drizzle schema declares them. It does not create or migrate anything.
21
+
9
22
  ## Quickstart — the bundle
10
23
 
11
24
  ```ts
@@ -64,8 +77,8 @@ the table): transaction runner, subscription/plan-version repositories
64
77
  (row-locked `findByTenantIdLocked`), the three promo repositories with
65
78
  atomic `claimSlot`/`releaseSlot`/`markExhaustedIfFull`, audit
66
79
  write/query/stats, MFA, RLS bypass, SuperAdmin bootstrap
67
- (`PASSWORD_HASHER_TOKEN`), plan-catalog read/import sinks, and the
68
- `ZeroPromoRevenueDeductionAggregator` default. Not shipped: contracts,
80
+ (`PASSWORD_HASHER_TOKEN`), plan-catalog read/import sinks, the record of the
81
+ applied settings, and the `ZeroPromoRevenueDeductionAggregator` default. Not shipped: contracts,
69
82
  bundle bookings, registration, tenant-billing write ports,
70
83
  `FirstTimeCustomerCheck` — same as the Prisma adapter.
71
84
 
@@ -83,3 +96,9 @@ The integration run applies the normative reference SQL and executes the
83
96
  `@saasicat/persistence-testing` contract plus drizzle-specific interop
84
97
  tests. **The database is disposable: the harness drops and recreates its
85
98
  `public` schema.**
99
+
100
+ ## Next
101
+
102
+ - [Ports and adapters](../../docs/explanation/adr/0007-ports-and-adapters.md) — why the seam is here
103
+ - [Data model](../../docs/explanation/data-model.md) — the tables and their constraints
104
+ - [`@saasicat/persistence-testing`](../persistence-testing/README.md) — the contract this passes
package/dist/.build-stamp CHANGED
@@ -1 +1 @@
1
- 4db6796a545521dbce56c1203f80c007e1230464feec78da79647c7136a993f1
1
+ a8b4312c475ecf972d0a52465ce8e214deea8ec8362932674c7e5c3fbcb1e77e