@foundrynorth/compass-schema 1.0.12 → 1.0.14
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 +134 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +12 -0
- package/dist/schema.js.map +1 -1
- package/package.json +1 -1
- package/src/schema.ts +14 -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
|
}>;
|
|
@@ -61804,4 +61823,119 @@ export declare const compassEventOutbox: import("drizzle-orm/pg-core").PgTableWi
|
|
|
61804
61823
|
}>;
|
|
61805
61824
|
export type CompassEventOutboxRecord = typeof compassEventOutbox.$inferSelect;
|
|
61806
61825
|
export type InsertCompassEventOutbox = typeof compassEventOutbox.$inferInsert;
|
|
61826
|
+
export declare const creativeDeliveries: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
61827
|
+
name: "creative_deliveries";
|
|
61828
|
+
schema: undefined;
|
|
61829
|
+
columns: {
|
|
61830
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
61831
|
+
name: "id";
|
|
61832
|
+
tableName: "creative_deliveries";
|
|
61833
|
+
dataType: "number";
|
|
61834
|
+
columnType: "PgSerial";
|
|
61835
|
+
data: number;
|
|
61836
|
+
driverParam: number;
|
|
61837
|
+
notNull: true;
|
|
61838
|
+
hasDefault: true;
|
|
61839
|
+
isPrimaryKey: true;
|
|
61840
|
+
isAutoincrement: false;
|
|
61841
|
+
hasRuntimeDefault: false;
|
|
61842
|
+
enumValues: undefined;
|
|
61843
|
+
baseColumn: never;
|
|
61844
|
+
identity: undefined;
|
|
61845
|
+
generated: undefined;
|
|
61846
|
+
}, {}, {}>;
|
|
61847
|
+
packageId: import("drizzle-orm/pg-core").PgColumn<{
|
|
61848
|
+
name: "package_id";
|
|
61849
|
+
tableName: "creative_deliveries";
|
|
61850
|
+
dataType: "string";
|
|
61851
|
+
columnType: "PgVarchar";
|
|
61852
|
+
data: string;
|
|
61853
|
+
driverParam: string;
|
|
61854
|
+
notNull: true;
|
|
61855
|
+
hasDefault: false;
|
|
61856
|
+
isPrimaryKey: false;
|
|
61857
|
+
isAutoincrement: false;
|
|
61858
|
+
hasRuntimeDefault: false;
|
|
61859
|
+
enumValues: [string, ...string[]];
|
|
61860
|
+
baseColumn: never;
|
|
61861
|
+
identity: undefined;
|
|
61862
|
+
generated: undefined;
|
|
61863
|
+
}, {}, {
|
|
61864
|
+
length: 255;
|
|
61865
|
+
}>;
|
|
61866
|
+
compassCampaignId: import("drizzle-orm/pg-core").PgColumn<{
|
|
61867
|
+
name: "compass_campaign_id";
|
|
61868
|
+
tableName: "creative_deliveries";
|
|
61869
|
+
dataType: "string";
|
|
61870
|
+
columnType: "PgVarchar";
|
|
61871
|
+
data: string;
|
|
61872
|
+
driverParam: string;
|
|
61873
|
+
notNull: true;
|
|
61874
|
+
hasDefault: false;
|
|
61875
|
+
isPrimaryKey: false;
|
|
61876
|
+
isAutoincrement: false;
|
|
61877
|
+
hasRuntimeDefault: false;
|
|
61878
|
+
enumValues: [string, ...string[]];
|
|
61879
|
+
baseColumn: never;
|
|
61880
|
+
identity: undefined;
|
|
61881
|
+
generated: undefined;
|
|
61882
|
+
}, {}, {
|
|
61883
|
+
length: 255;
|
|
61884
|
+
}>;
|
|
61885
|
+
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
61886
|
+
name: "status";
|
|
61887
|
+
tableName: "creative_deliveries";
|
|
61888
|
+
dataType: "string";
|
|
61889
|
+
columnType: "PgVarchar";
|
|
61890
|
+
data: string;
|
|
61891
|
+
driverParam: string;
|
|
61892
|
+
notNull: true;
|
|
61893
|
+
hasDefault: false;
|
|
61894
|
+
isPrimaryKey: false;
|
|
61895
|
+
isAutoincrement: false;
|
|
61896
|
+
hasRuntimeDefault: false;
|
|
61897
|
+
enumValues: [string, ...string[]];
|
|
61898
|
+
baseColumn: never;
|
|
61899
|
+
identity: undefined;
|
|
61900
|
+
generated: undefined;
|
|
61901
|
+
}, {}, {
|
|
61902
|
+
length: 50;
|
|
61903
|
+
}>;
|
|
61904
|
+
assetCount: import("drizzle-orm/pg-core").PgColumn<{
|
|
61905
|
+
name: "asset_count";
|
|
61906
|
+
tableName: "creative_deliveries";
|
|
61907
|
+
dataType: "number";
|
|
61908
|
+
columnType: "PgInteger";
|
|
61909
|
+
data: number;
|
|
61910
|
+
driverParam: string | number;
|
|
61911
|
+
notNull: true;
|
|
61912
|
+
hasDefault: true;
|
|
61913
|
+
isPrimaryKey: false;
|
|
61914
|
+
isAutoincrement: false;
|
|
61915
|
+
hasRuntimeDefault: false;
|
|
61916
|
+
enumValues: undefined;
|
|
61917
|
+
baseColumn: never;
|
|
61918
|
+
identity: undefined;
|
|
61919
|
+
generated: undefined;
|
|
61920
|
+
}, {}, {}>;
|
|
61921
|
+
receivedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
61922
|
+
name: "received_at";
|
|
61923
|
+
tableName: "creative_deliveries";
|
|
61924
|
+
dataType: "date";
|
|
61925
|
+
columnType: "PgTimestamp";
|
|
61926
|
+
data: Date;
|
|
61927
|
+
driverParam: string;
|
|
61928
|
+
notNull: true;
|
|
61929
|
+
hasDefault: true;
|
|
61930
|
+
isPrimaryKey: false;
|
|
61931
|
+
isAutoincrement: false;
|
|
61932
|
+
hasRuntimeDefault: false;
|
|
61933
|
+
enumValues: undefined;
|
|
61934
|
+
baseColumn: never;
|
|
61935
|
+
identity: undefined;
|
|
61936
|
+
generated: undefined;
|
|
61937
|
+
}, {}, {}>;
|
|
61938
|
+
};
|
|
61939
|
+
dialect: "pg";
|
|
61940
|
+
}>;
|
|
61807
61941
|
//# sourceMappingURL=schema.d.ts.map
|