fix(db): drop deprecated contact.application_id from schema
The contact_application junction commit (1d0235a) had already dropped the deprecated applicationId column from the live DB via migration 0001, but schema.ts was left with the column declaration (it was put back temporarily during commit preparation to keep schema.ts consistent with 0000_init.sql, then never re-removed for the junction commit). This caused Drizzle to generate INSERTs against a non-existent column when creating contacts. Schema.ts now matches the live DB; no migration needed (0001 already dropped the column).
This commit is contained in:
parent
86c8f0b255
commit
f212667b7d
1 changed files with 1 additions and 9 deletions
|
|
@ -247,11 +247,6 @@ export const contact = pgTable(
|
|||
companyId: integer("company_id").references(() => company.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
// Deprecated: use contactApplication junction for many-to-many. Kept for
|
||||
// backward compatibility with existing queries; remove after migrating callers.
|
||||
applicationId: integer("application_id").references(() => application.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
name: text("name").notNull(),
|
||||
role: text("role"),
|
||||
email: text("email"),
|
||||
|
|
@ -261,10 +256,7 @@ export const contact = pgTable(
|
|||
lastContactDate: text("last_contact_date"),
|
||||
...timestamps,
|
||||
},
|
||||
(table) => [
|
||||
index("idx_contact_company").on(table.companyId),
|
||||
index("idx_contact_application").on(table.applicationId),
|
||||
]
|
||||
(table) => [index("idx_contact_company").on(table.companyId)]
|
||||
);
|
||||
|
||||
export const promptConfig = pgTable("prompt_config", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue