@foundrynorth/compass-schema 1.0.11 → 1.0.13
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 +43 -0
- package/dist/schema.d.ts +286 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +34 -0
- package/dist/schema.js.map +1 -1
- package/package.json +1 -1
- package/src/schema.ts +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @foundrynorth/compass-schema
|
|
2
|
+
|
|
3
|
+
Canonical Drizzle ORM schema for the Foundry Compass database (`rough-waterfall-94134914`). 161 tables, 27 enums.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @foundrynorth/compass-schema
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { mediaOrders, partners, plans } from "@foundrynorth/compass-schema";
|
|
15
|
+
import { relations } from "@foundrynorth/compass-schema/relations";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
| Export | Purpose |
|
|
19
|
+
|--------|---------|
|
|
20
|
+
| `@foundrynorth/compass-schema` | All table and enum definitions |
|
|
21
|
+
| `@foundrynorth/compass-schema/relations` | Drizzle relation definitions |
|
|
22
|
+
|
|
23
|
+
## Consumers
|
|
24
|
+
|
|
25
|
+
- **fn-legacy** (Compass) — also keeps a local copy in `shared/schema.ts` (drift-checked)
|
|
26
|
+
- **fn-worker** (BullMQ processor)
|
|
27
|
+
- **fn-v2** (Trigger.dev tasks)
|
|
28
|
+
|
|
29
|
+
## Schema Change Workflow
|
|
30
|
+
|
|
31
|
+
**Only fn-legacy has `drizzle-kit push` authority** for this database.
|
|
32
|
+
|
|
33
|
+
1. Edit `src/schema.ts` in this repo
|
|
34
|
+
2. `npm run build && npm version patch && npm publish`
|
|
35
|
+
3. Update fn-legacy: `npm install @foundrynorth/compass-schema@latest`
|
|
36
|
+
4. Also update fn-legacy's `shared/schema.ts` (local copy)
|
|
37
|
+
5. Run `npm run check` in fn-legacy to verify no drift
|
|
38
|
+
6. Run `npm run db:push` in fn-legacy to apply to database
|
|
39
|
+
7. Update fn-worker and fn-v2 to the new version
|
|
40
|
+
|
|
41
|
+
## Full Documentation
|
|
42
|
+
|
|
43
|
+
See [fn-docs: Shared Packages](https://fn-docs.vercel.app/docs/compass-v2/shared-packages) for the complete publish workflow and consumer matrix.
|
package/dist/schema.d.ts
CHANGED
|
@@ -43108,6 +43108,25 @@ export declare const presentationDecks: import("drizzle-orm/pg-core").PgTableWit
|
|
|
43108
43108
|
identity: undefined;
|
|
43109
43109
|
generated: undefined;
|
|
43110
43110
|
}, {}, {}>;
|
|
43111
|
+
blueprintJson: import("drizzle-orm/pg-core").PgColumn<{
|
|
43112
|
+
name: "blueprint_json";
|
|
43113
|
+
tableName: "presentation_decks";
|
|
43114
|
+
dataType: "json";
|
|
43115
|
+
columnType: "PgJsonb";
|
|
43116
|
+
data: Record<string, any>;
|
|
43117
|
+
driverParam: unknown;
|
|
43118
|
+
notNull: false;
|
|
43119
|
+
hasDefault: false;
|
|
43120
|
+
isPrimaryKey: false;
|
|
43121
|
+
isAutoincrement: false;
|
|
43122
|
+
hasRuntimeDefault: false;
|
|
43123
|
+
enumValues: undefined;
|
|
43124
|
+
baseColumn: never;
|
|
43125
|
+
identity: undefined;
|
|
43126
|
+
generated: undefined;
|
|
43127
|
+
}, {}, {
|
|
43128
|
+
$type: Record<string, any>;
|
|
43129
|
+
}>;
|
|
43111
43130
|
};
|
|
43112
43131
|
dialect: "pg";
|
|
43113
43132
|
}>;
|
|
@@ -61537,4 +61556,271 @@ export declare const semCampaigns: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
61537
61556
|
}>;
|
|
61538
61557
|
export type SemCampaignRecord = typeof semCampaigns.$inferSelect;
|
|
61539
61558
|
export type InsertSemCampaign = typeof semCampaigns.$inferInsert;
|
|
61559
|
+
export declare const compassEventOutboxStatusEnum: import("drizzle-orm/pg-core").PgEnum<["pending", "failed", "delivered", "dead_letter"]>;
|
|
61560
|
+
export declare const compassEventOutbox: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
61561
|
+
name: "compass_event_outbox";
|
|
61562
|
+
schema: undefined;
|
|
61563
|
+
columns: {
|
|
61564
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
61565
|
+
name: "id";
|
|
61566
|
+
tableName: "compass_event_outbox";
|
|
61567
|
+
dataType: "string";
|
|
61568
|
+
columnType: "PgText";
|
|
61569
|
+
data: string;
|
|
61570
|
+
driverParam: string;
|
|
61571
|
+
notNull: true;
|
|
61572
|
+
hasDefault: false;
|
|
61573
|
+
isPrimaryKey: true;
|
|
61574
|
+
isAutoincrement: false;
|
|
61575
|
+
hasRuntimeDefault: false;
|
|
61576
|
+
enumValues: [string, ...string[]];
|
|
61577
|
+
baseColumn: never;
|
|
61578
|
+
identity: undefined;
|
|
61579
|
+
generated: undefined;
|
|
61580
|
+
}, {}, {}>;
|
|
61581
|
+
eventId: import("drizzle-orm/pg-core").PgColumn<{
|
|
61582
|
+
name: "event_id";
|
|
61583
|
+
tableName: "compass_event_outbox";
|
|
61584
|
+
dataType: "string";
|
|
61585
|
+
columnType: "PgText";
|
|
61586
|
+
data: string;
|
|
61587
|
+
driverParam: string;
|
|
61588
|
+
notNull: true;
|
|
61589
|
+
hasDefault: false;
|
|
61590
|
+
isPrimaryKey: false;
|
|
61591
|
+
isAutoincrement: false;
|
|
61592
|
+
hasRuntimeDefault: false;
|
|
61593
|
+
enumValues: [string, ...string[]];
|
|
61594
|
+
baseColumn: never;
|
|
61595
|
+
identity: undefined;
|
|
61596
|
+
generated: undefined;
|
|
61597
|
+
}, {}, {}>;
|
|
61598
|
+
eventType: import("drizzle-orm/pg-core").PgColumn<{
|
|
61599
|
+
name: "event_type";
|
|
61600
|
+
tableName: "compass_event_outbox";
|
|
61601
|
+
dataType: "string";
|
|
61602
|
+
columnType: "PgText";
|
|
61603
|
+
data: string;
|
|
61604
|
+
driverParam: string;
|
|
61605
|
+
notNull: true;
|
|
61606
|
+
hasDefault: false;
|
|
61607
|
+
isPrimaryKey: false;
|
|
61608
|
+
isAutoincrement: false;
|
|
61609
|
+
hasRuntimeDefault: false;
|
|
61610
|
+
enumValues: [string, ...string[]];
|
|
61611
|
+
baseColumn: never;
|
|
61612
|
+
identity: undefined;
|
|
61613
|
+
generated: undefined;
|
|
61614
|
+
}, {}, {}>;
|
|
61615
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
61616
|
+
name: "idempotency_key";
|
|
61617
|
+
tableName: "compass_event_outbox";
|
|
61618
|
+
dataType: "string";
|
|
61619
|
+
columnType: "PgText";
|
|
61620
|
+
data: string;
|
|
61621
|
+
driverParam: string;
|
|
61622
|
+
notNull: true;
|
|
61623
|
+
hasDefault: false;
|
|
61624
|
+
isPrimaryKey: false;
|
|
61625
|
+
isAutoincrement: false;
|
|
61626
|
+
hasRuntimeDefault: false;
|
|
61627
|
+
enumValues: [string, ...string[]];
|
|
61628
|
+
baseColumn: never;
|
|
61629
|
+
identity: undefined;
|
|
61630
|
+
generated: undefined;
|
|
61631
|
+
}, {}, {}>;
|
|
61632
|
+
emittedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
61633
|
+
name: "emitted_at";
|
|
61634
|
+
tableName: "compass_event_outbox";
|
|
61635
|
+
dataType: "date";
|
|
61636
|
+
columnType: "PgTimestamp";
|
|
61637
|
+
data: Date;
|
|
61638
|
+
driverParam: string;
|
|
61639
|
+
notNull: true;
|
|
61640
|
+
hasDefault: false;
|
|
61641
|
+
isPrimaryKey: false;
|
|
61642
|
+
isAutoincrement: false;
|
|
61643
|
+
hasRuntimeDefault: false;
|
|
61644
|
+
enumValues: undefined;
|
|
61645
|
+
baseColumn: never;
|
|
61646
|
+
identity: undefined;
|
|
61647
|
+
generated: undefined;
|
|
61648
|
+
}, {}, {}>;
|
|
61649
|
+
actorUserId: import("drizzle-orm/pg-core").PgColumn<{
|
|
61650
|
+
name: "actor_user_id";
|
|
61651
|
+
tableName: "compass_event_outbox";
|
|
61652
|
+
dataType: "string";
|
|
61653
|
+
columnType: "PgText";
|
|
61654
|
+
data: string;
|
|
61655
|
+
driverParam: string;
|
|
61656
|
+
notNull: false;
|
|
61657
|
+
hasDefault: false;
|
|
61658
|
+
isPrimaryKey: false;
|
|
61659
|
+
isAutoincrement: false;
|
|
61660
|
+
hasRuntimeDefault: false;
|
|
61661
|
+
enumValues: [string, ...string[]];
|
|
61662
|
+
baseColumn: never;
|
|
61663
|
+
identity: undefined;
|
|
61664
|
+
generated: undefined;
|
|
61665
|
+
}, {}, {}>;
|
|
61666
|
+
actorUsername: import("drizzle-orm/pg-core").PgColumn<{
|
|
61667
|
+
name: "actor_username";
|
|
61668
|
+
tableName: "compass_event_outbox";
|
|
61669
|
+
dataType: "string";
|
|
61670
|
+
columnType: "PgText";
|
|
61671
|
+
data: string;
|
|
61672
|
+
driverParam: string;
|
|
61673
|
+
notNull: false;
|
|
61674
|
+
hasDefault: false;
|
|
61675
|
+
isPrimaryKey: false;
|
|
61676
|
+
isAutoincrement: false;
|
|
61677
|
+
hasRuntimeDefault: false;
|
|
61678
|
+
enumValues: [string, ...string[]];
|
|
61679
|
+
baseColumn: never;
|
|
61680
|
+
identity: undefined;
|
|
61681
|
+
generated: undefined;
|
|
61682
|
+
}, {}, {}>;
|
|
61683
|
+
payload: import("drizzle-orm/pg-core").PgColumn<{
|
|
61684
|
+
name: "payload";
|
|
61685
|
+
tableName: "compass_event_outbox";
|
|
61686
|
+
dataType: "json";
|
|
61687
|
+
columnType: "PgJsonb";
|
|
61688
|
+
data: Record<string, unknown>;
|
|
61689
|
+
driverParam: unknown;
|
|
61690
|
+
notNull: true;
|
|
61691
|
+
hasDefault: false;
|
|
61692
|
+
isPrimaryKey: false;
|
|
61693
|
+
isAutoincrement: false;
|
|
61694
|
+
hasRuntimeDefault: false;
|
|
61695
|
+
enumValues: undefined;
|
|
61696
|
+
baseColumn: never;
|
|
61697
|
+
identity: undefined;
|
|
61698
|
+
generated: undefined;
|
|
61699
|
+
}, {}, {
|
|
61700
|
+
$type: Record<string, unknown>;
|
|
61701
|
+
}>;
|
|
61702
|
+
deliveryStatus: import("drizzle-orm/pg-core").PgColumn<{
|
|
61703
|
+
name: "delivery_status";
|
|
61704
|
+
tableName: "compass_event_outbox";
|
|
61705
|
+
dataType: "string";
|
|
61706
|
+
columnType: "PgEnumColumn";
|
|
61707
|
+
data: "pending" | "failed" | "delivered" | "dead_letter";
|
|
61708
|
+
driverParam: string;
|
|
61709
|
+
notNull: true;
|
|
61710
|
+
hasDefault: true;
|
|
61711
|
+
isPrimaryKey: false;
|
|
61712
|
+
isAutoincrement: false;
|
|
61713
|
+
hasRuntimeDefault: false;
|
|
61714
|
+
enumValues: ["pending", "failed", "delivered", "dead_letter"];
|
|
61715
|
+
baseColumn: never;
|
|
61716
|
+
identity: undefined;
|
|
61717
|
+
generated: undefined;
|
|
61718
|
+
}, {}, {}>;
|
|
61719
|
+
attemptCount: import("drizzle-orm/pg-core").PgColumn<{
|
|
61720
|
+
name: "attempt_count";
|
|
61721
|
+
tableName: "compass_event_outbox";
|
|
61722
|
+
dataType: "number";
|
|
61723
|
+
columnType: "PgInteger";
|
|
61724
|
+
data: number;
|
|
61725
|
+
driverParam: string | number;
|
|
61726
|
+
notNull: true;
|
|
61727
|
+
hasDefault: true;
|
|
61728
|
+
isPrimaryKey: false;
|
|
61729
|
+
isAutoincrement: false;
|
|
61730
|
+
hasRuntimeDefault: false;
|
|
61731
|
+
enumValues: undefined;
|
|
61732
|
+
baseColumn: never;
|
|
61733
|
+
identity: undefined;
|
|
61734
|
+
generated: undefined;
|
|
61735
|
+
}, {}, {}>;
|
|
61736
|
+
nextAttemptAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
61737
|
+
name: "next_attempt_at";
|
|
61738
|
+
tableName: "compass_event_outbox";
|
|
61739
|
+
dataType: "date";
|
|
61740
|
+
columnType: "PgTimestamp";
|
|
61741
|
+
data: Date;
|
|
61742
|
+
driverParam: string;
|
|
61743
|
+
notNull: true;
|
|
61744
|
+
hasDefault: true;
|
|
61745
|
+
isPrimaryKey: false;
|
|
61746
|
+
isAutoincrement: false;
|
|
61747
|
+
hasRuntimeDefault: false;
|
|
61748
|
+
enumValues: undefined;
|
|
61749
|
+
baseColumn: never;
|
|
61750
|
+
identity: undefined;
|
|
61751
|
+
generated: undefined;
|
|
61752
|
+
}, {}, {}>;
|
|
61753
|
+
deliveredAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
61754
|
+
name: "delivered_at";
|
|
61755
|
+
tableName: "compass_event_outbox";
|
|
61756
|
+
dataType: "date";
|
|
61757
|
+
columnType: "PgTimestamp";
|
|
61758
|
+
data: Date;
|
|
61759
|
+
driverParam: string;
|
|
61760
|
+
notNull: false;
|
|
61761
|
+
hasDefault: false;
|
|
61762
|
+
isPrimaryKey: false;
|
|
61763
|
+
isAutoincrement: false;
|
|
61764
|
+
hasRuntimeDefault: false;
|
|
61765
|
+
enumValues: undefined;
|
|
61766
|
+
baseColumn: never;
|
|
61767
|
+
identity: undefined;
|
|
61768
|
+
generated: undefined;
|
|
61769
|
+
}, {}, {}>;
|
|
61770
|
+
lastError: import("drizzle-orm/pg-core").PgColumn<{
|
|
61771
|
+
name: "last_error";
|
|
61772
|
+
tableName: "compass_event_outbox";
|
|
61773
|
+
dataType: "string";
|
|
61774
|
+
columnType: "PgText";
|
|
61775
|
+
data: string;
|
|
61776
|
+
driverParam: string;
|
|
61777
|
+
notNull: false;
|
|
61778
|
+
hasDefault: false;
|
|
61779
|
+
isPrimaryKey: false;
|
|
61780
|
+
isAutoincrement: false;
|
|
61781
|
+
hasRuntimeDefault: false;
|
|
61782
|
+
enumValues: [string, ...string[]];
|
|
61783
|
+
baseColumn: never;
|
|
61784
|
+
identity: undefined;
|
|
61785
|
+
generated: undefined;
|
|
61786
|
+
}, {}, {}>;
|
|
61787
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
61788
|
+
name: "created_at";
|
|
61789
|
+
tableName: "compass_event_outbox";
|
|
61790
|
+
dataType: "date";
|
|
61791
|
+
columnType: "PgTimestamp";
|
|
61792
|
+
data: Date;
|
|
61793
|
+
driverParam: string;
|
|
61794
|
+
notNull: true;
|
|
61795
|
+
hasDefault: true;
|
|
61796
|
+
isPrimaryKey: false;
|
|
61797
|
+
isAutoincrement: false;
|
|
61798
|
+
hasRuntimeDefault: false;
|
|
61799
|
+
enumValues: undefined;
|
|
61800
|
+
baseColumn: never;
|
|
61801
|
+
identity: undefined;
|
|
61802
|
+
generated: undefined;
|
|
61803
|
+
}, {}, {}>;
|
|
61804
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
61805
|
+
name: "updated_at";
|
|
61806
|
+
tableName: "compass_event_outbox";
|
|
61807
|
+
dataType: "date";
|
|
61808
|
+
columnType: "PgTimestamp";
|
|
61809
|
+
data: Date;
|
|
61810
|
+
driverParam: string;
|
|
61811
|
+
notNull: true;
|
|
61812
|
+
hasDefault: true;
|
|
61813
|
+
isPrimaryKey: false;
|
|
61814
|
+
isAutoincrement: false;
|
|
61815
|
+
hasRuntimeDefault: false;
|
|
61816
|
+
enumValues: undefined;
|
|
61817
|
+
baseColumn: never;
|
|
61818
|
+
identity: undefined;
|
|
61819
|
+
generated: undefined;
|
|
61820
|
+
}, {}, {}>;
|
|
61821
|
+
};
|
|
61822
|
+
dialect: "pg";
|
|
61823
|
+
}>;
|
|
61824
|
+
export type CompassEventOutboxRecord = typeof compassEventOutbox.$inferSelect;
|
|
61825
|
+
export type InsertCompassEventOutbox = typeof compassEventOutbox.$inferInsert;
|
|
61540
61826
|
//# sourceMappingURL=schema.d.ts.map
|