(tableId: string, requestId: string)
| 599 | * @param requestId - Request ID for logging |
| 600 | */ |
| 601 | export async function deleteTable(tableId: string, requestId: string): Promise<void> { |
| 602 | await db |
| 603 | .update(userTableDefinitions) |
| 604 | .set({ archivedAt: new Date(), updatedAt: new Date() }) |
| 605 | .where(eq(userTableDefinitions.id, tableId)) |
| 606 | |
| 607 | logger.info(`[${requestId}] Archived table ${tableId}`) |
| 608 | } |
| 609 | |
| 610 | /** |
| 611 | * Restores an archived table. |