mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
fix(fingerprint): set fingerprintId reference to null
This commit is contained in:
committed by
Owen Schwartz
parent
3ce1afbcc9
commit
e2e09527ec
@@ -803,11 +803,12 @@ export const currentFingerprint = pgTable("currentFingerprint", {
|
|||||||
export const fingerprintSnapshots = pgTable("fingerprintSnapshots", {
|
export const fingerprintSnapshots = pgTable("fingerprintSnapshots", {
|
||||||
snapshotId: serial("id").primaryKey(),
|
snapshotId: serial("id").primaryKey(),
|
||||||
|
|
||||||
fingerprintId: integer("fingerprintId")
|
fingerprintId: integer("fingerprintId").references(
|
||||||
.references(() => currentFingerprint.fingerprintId, {
|
() => currentFingerprint.fingerprintId,
|
||||||
onDelete: "cascade"
|
{
|
||||||
})
|
onDelete: "set null"
|
||||||
.notNull(),
|
}
|
||||||
|
),
|
||||||
|
|
||||||
username: text("username"),
|
username: text("username"),
|
||||||
hostname: text("hostname"),
|
hostname: text("hostname"),
|
||||||
|
|||||||
@@ -512,11 +512,12 @@ export const currentFingerprint = sqliteTable("currentFingerprint", {
|
|||||||
export const fingerprintSnapshots = sqliteTable("fingerprintSnapshots", {
|
export const fingerprintSnapshots = sqliteTable("fingerprintSnapshots", {
|
||||||
snapshotId: integer("id").primaryKey({ autoIncrement: true }),
|
snapshotId: integer("id").primaryKey({ autoIncrement: true }),
|
||||||
|
|
||||||
fingerprintId: integer("fingerprintId")
|
fingerprintId: integer("fingerprintId").references(
|
||||||
.references(() => currentFingerprint.fingerprintId, {
|
() => currentFingerprint.fingerprintId,
|
||||||
onDelete: "cascade"
|
{
|
||||||
})
|
onDelete: "set null"
|
||||||
.notNull(),
|
}
|
||||||
|
),
|
||||||
|
|
||||||
username: text("username"),
|
username: text("username"),
|
||||||
hostname: text("hostname"),
|
hostname: text("hostname"),
|
||||||
|
|||||||
Reference in New Issue
Block a user