TS fixes
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
|
||||
import { tenants } from "./tenants"
|
||||
import { vehicles } from "./vehicles"
|
||||
import { inventoryItems } from "./inventoryitems"
|
||||
import { inventoryitems } from "./inventoryitems"
|
||||
import { authUsers } from "./auth_users"
|
||||
|
||||
export const checks = pgTable("checks", {
|
||||
@@ -26,7 +26,7 @@ export const checks = pgTable("checks", {
|
||||
// ❌ profile removed (old 0_profiles reference)
|
||||
|
||||
inventoryItem: bigint("inventoryitem", { mode: "number" })
|
||||
.references(() => inventoryItems.id),
|
||||
.references(() => inventoryitems.id),
|
||||
|
||||
tenant: bigint("tenant", { mode: "number" })
|
||||
.references(() => tenants.id),
|
||||
|
||||
@@ -17,7 +17,7 @@ import { plants } from "./plants"
|
||||
import { createddocuments } from "./createddocuments"
|
||||
import { vehicles } from "./vehicles"
|
||||
import { products } from "./products"
|
||||
import { inventoryItems } from "./inventoryitems"
|
||||
import { inventoryitems } from "./inventoryitems"
|
||||
import { folders } from "./folders"
|
||||
import { filetags } from "./filetags"
|
||||
import { authUsers } from "./auth_users"
|
||||
@@ -51,7 +51,7 @@ export const files = pgTable("files", {
|
||||
|
||||
check: uuid("check").references(() => checks.id),
|
||||
|
||||
inventoryitem: bigint("inventoryitem", { mode: "number" }).references(() => inventoryItems.id),
|
||||
inventoryitem: bigint("inventoryitem", { mode: "number" }).references(() => inventoryitems.id),
|
||||
|
||||
folder: uuid("folder").references(() => folders.id),
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { projects } from "./projects"
|
||||
import { plants } from "./plants"
|
||||
import { incominginvoices } from "./incominginvoices"
|
||||
import { contacts } from "./contacts"
|
||||
import { inventoryItems } from "./inventoryitems"
|
||||
import { inventoryitems } from "./inventoryitems"
|
||||
import { products } from "./products"
|
||||
import { tasks } from "./tasks"
|
||||
import { vehicles } from "./vehicles"
|
||||
@@ -75,7 +75,7 @@ export const historyitems = pgTable("historyitems", {
|
||||
}),
|
||||
|
||||
inventoryitem: bigint("inventoryitem", { mode: "number" }).references(
|
||||
() => inventoryItems.id,
|
||||
() => inventoryitems.id,
|
||||
{ onDelete: "cascade" }
|
||||
),
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
text,
|
||||
} from "drizzle-orm/pg-core"
|
||||
|
||||
import { staffTimeEntries } from "./staff_time_entries"
|
||||
import { stafftimeentries } from "./staff_time_entries"
|
||||
import {sql} from "drizzle-orm";
|
||||
|
||||
export const staffTimeEntryConnects = pgTable("staff_time_entry_connects", {
|
||||
@@ -15,7 +15,7 @@ export const staffTimeEntryConnects = pgTable("staff_time_entry_connects", {
|
||||
|
||||
timeEntryId: uuid("time_entry_id")
|
||||
.notNull()
|
||||
.references(() => staffTimeEntries.id, { onDelete: "cascade" }),
|
||||
.references(() => stafftimeentries.id, { onDelete: "cascade" }),
|
||||
|
||||
projectId: bigint("project_id", { mode: "number" }), // referenziert später projects.id
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
|
||||
import { tenants } from "./tenants"
|
||||
import { authProfiles } from "./auth_profiles"
|
||||
import { staffTimeEntries } from "./staff_time_entries"
|
||||
import { stafftimeentries } from "./staff_time_entries"
|
||||
|
||||
export const staffZeitstromTimestamps = pgTable("staff_zeitstromtimestamps", {
|
||||
id: uuid("id").primaryKey().defaultRandom(),
|
||||
@@ -32,7 +32,7 @@ export const staffZeitstromTimestamps = pgTable("staff_zeitstromtimestamps", {
|
||||
time: timestamp("time", { withTimezone: true }).notNull(),
|
||||
|
||||
staffTimeEntry: uuid("staff_time_entry").references(
|
||||
() => staffTimeEntries.id
|
||||
() => stafftimeentries.id
|
||||
),
|
||||
|
||||
internalNote: text("internal_note"),
|
||||
|
||||
Reference in New Issue
Block a user