| 1 | import { |
| 2 | index, |
| 3 | mysqlTable, |
| 4 | text, |
| 5 | timestamp, |
| 6 | unique, |
| 7 | varchar, |
| 8 | } from "drizzle-orm/mysql-core"; |
| 9 | import { nodes } |
| 10 | |
| 11 | export const backupDestinations = |
| 12 | "backup_destinations", |
| 13 | { |
| 14 | id: varchar("id |
| 15 | nodeId: varchar("node_id |
| 16 | onDelete: "cascade", |
| 17 | }), |
| 18 | type: varchar("type |
| 19 | config: text("config |
| 20 | createdAt: timestamp("created_at |
| 21 | updatedAt: timestamp("updated_at |
| 22 | .defaultNow() |
| 23 | .$onUpdate(() => |
| 24 | .notNull(), |
| 25 | }, |
| 26 | (table) => |
| 27 | index("backup_destinations_nodeId_idx"). |
| 28 | unique("backup_destinations_nodeId_unique"). |
| 29 | ], |
| 30 | ); |