Add back hashed hex for secret sharing

This commit is contained in:
Tuan Dang
2024-07-30 07:16:03 -07:00
parent 0d4164ea81
commit 7cbd254f06
16 changed files with 100 additions and 322 deletions
@@ -17,13 +17,6 @@ export async function up(knex: Knex): Promise<void> {
t.timestamp("lastViewedAt").nullable();
});
}
const doesHashedHexExist = await knex.schema.hasColumn(TableName.SecretSharing, "hashedHex");
if (doesHashedHexExist) {
await knex.schema.alterTable(TableName.SecretSharing, (t) => {
t.dropColumn("hashedHex");
});
}
}
}
+1
View File
@@ -12,6 +12,7 @@ export const SecretSharingSchema = z.object({
encryptedValue: z.string(),
iv: z.string(),
tag: z.string(),
hashedHex: z.string(),
expiresAt: z.date(),
userId: z.string().uuid().nullable().optional(),
orgId: z.string().uuid().nullable().optional(),