Skip to content

Commit 57cf158

Browse files
Removed JobSource table.
1 parent ec73566 commit 57cf158

1 file changed

Lines changed: 6 additions & 18 deletions

File tree

schema.prisma

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,15 @@ model Job {
5555
createdAt DateTime @default(now()) @map("created_at") // Record creation timestamp
5656
updatedAt DateTime @updatedAt @map("updated_at") // Auto-updated timestamp
5757
58+
// Moved from JobSource
59+
source String? @map("source")
60+
externalId String? @map("external_id")
61+
data Json? @map("data")
62+
5863
tags JobTag[] // Many-to-many relation to Tag via JobTag
5964
metadata JobMetadata[] // Arbitrary extra fields (key/value) for this job
60-
sources JobSource[] // Provenance/source records for this job (can have multiple)
6165
66+
@@index([source, externalId], name: "jobs_source_external_id_idx")
6267
@@map("jobs")
6368
}
6469

@@ -112,23 +117,6 @@ model JobMetadata {
112117
@@map("job_metadata")
113118
}
114119

115-
/// Tracks the source(s) from which this job was imported.
116-
/// Used for provenance, deduplication, and full source data storage.
117-
model JobSource {
118-
id Int @id @default(autoincrement()) @map("id")
119-
jobId Int @map("job_id") // FK to Job
120-
source String @map("source") // E.g. "reddit", "web3career"
121-
externalId String? @map("external_id") // ID from source system (for deduplication)
122-
rawUrl String? @map("raw_url") // Original URL on source site
123-
data Json? @map("data") // Raw, full source data
124-
createdAt DateTime @default(now()) @map("created_at") // Record creation timestamp
125-
126-
job Job @relation(fields: [jobId], references: [id])
127-
128-
@@unique([source, externalId])
129-
@@map("job_sources")
130-
}
131-
132120
/// Enables polymorphic tagging (linking tags to any model, not just jobs).
133121
/// For future extensibility; currently jobs use JobTag directly.
134122
model Taggable {

0 commit comments

Comments
 (0)