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

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
@@ -62,10 +75,11 @@ Conventions the adapter upholds for Prisma parity on the shared schema:
62
75
  Identical port coverage to `@saasicat/adapter-prisma` (see its README for
63
76
  the table): transaction runner, subscription/plan-version repositories
64
77
  (row-locked `findByTenantIdLocked`), the three promo repositories with
65
- atomic `claimSlot`/`releaseSlot`/`markExhaustedIfFull`, audit
78
+ atomic `claimSlot`/`releaseSlot`/`markExhaustedIfFull` and the slots held for
79
+ checkouts, audit
66
80
  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,
81
+ (`PASSWORD_HASHER_TOKEN`), plan-catalog read/import sinks, the record of the
82
+ applied settings, and the `ZeroPromoRevenueDeductionAggregator` default. Not shipped: contracts,
69
83
  bundle bookings, registration, tenant-billing write ports,
70
84
  `FirstTimeCustomerCheck` — same as the Prisma adapter.
71
85
 
@@ -83,3 +97,9 @@ The integration run applies the normative reference SQL and executes the
83
97
  `@saasicat/persistence-testing` contract plus drizzle-specific interop
84
98
  tests. **The database is disposable: the harness drops and recreates its
85
99
  `public` schema.**
100
+
101
+ ## Next
102
+
103
+ - [Ports and adapters](../../docs/explanation/adr/0007-ports-and-adapters.md) — why the seam is here
104
+ - [Data model](../../docs/explanation/data-model.md) — the tables and their constraints
105
+ - [`@saasicat/persistence-testing`](../persistence-testing/README.md) — the contract this passes
package/dist/.build-stamp CHANGED
@@ -1 +1 @@
1
- 4db6796a545521dbce56c1203f80c007e1230464feec78da79647c7136a993f1
1
+ 2c3c34a2970f2e341725bee48ddb47e4a7e5f89c4478d073f026b9a8e2d631c2