@foundrynorth/compass-schema 1.0.17 → 1.0.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foundrynorth/compass-schema",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "Canonical Drizzle ORM schema for Foundry Compass (rough-waterfall database)",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/src/schema.ts CHANGED
@@ -4780,6 +4780,9 @@ export const mediaOrders = pgTable(
4780
4780
  // Order-level notes
4781
4781
  orderNotes: text("order_notes"),
4782
4782
 
4783
+ // Sales initiative (links to sales_initiatives table)
4784
+ initiativeCode: varchar("initiative_code"),
4785
+
4783
4786
  // Billing fields
4784
4787
  navigaAdvertiserId: text("naviga_advertiser_id"),
4785
4788
  purchaseOrderNumber: text("purchase_order_number"),
@@ -4841,6 +4844,7 @@ export const mediaOrders = pgTable(
4841
4844
  index("media_orders_vendor_fulfillment_status_idx").on(table.vendorFulfillmentStatus),
4842
4845
  index("media_orders_parent_company_idx").on(table.parentHubspotCompanyId),
4843
4846
  index("media_orders_contract_id_idx").on(table.contractId),
4847
+ index("media_orders_initiative_code_idx").on(table.initiativeCode),
4844
4848
  ]
4845
4849
  );
4846
4850
 
@@ -7307,25 +7311,8 @@ export const signerRoleEnum = pgEnum("signer_role", [
7307
7311
  "counter_signer",
7308
7312
  ]);
7309
7313
 
7310
- export const contractSigners = pgTable(
7311
- "contract_signers",
7312
- {
7313
- id: uuid("id").primaryKey().defaultRandom(),
7314
- contractId: uuid("contract_id")
7315
- .notNull()
7316
- .references(() => contracts.id, { onDelete: "cascade" }),
7317
- role: signerRoleEnum("role").notNull().default("client_signer"),
7318
- displayOrder: integer("display_order").notNull().default(1),
7319
- hubspotContactId: text("hubspot_contact_id"),
7320
- name: text("name").notNull(),
7321
- email: text("email").notNull(),
7322
- createdAt: timestamp("created_at").notNull().defaultNow(),
7323
- },
7324
- (table) => [
7325
- index("contract_signers_contract_id_idx").on(table.contractId),
7326
- ]
7327
- );
7328
- export type ContractSigner = typeof contractSigners.$inferSelect;
7314
+ // contractSigners table removed — signing is managed in fn-flux.
7315
+ // signerRoleEnum is retained because orderSigners still uses it.
7329
7316
 
7330
7317
  export const orderSigners = pgTable(
7331
7318
  "order_signers",