misc: ignore partitions in generate schema

This commit is contained in:
Sheen Capadngan
2024-10-04 22:37:13 +08:00
parent cf446a38b3
commit 1687d66a0e
2 changed files with 2 additions and 3 deletions

View File

@@ -90,7 +90,7 @@ const main = async () => {
.whereRaw("table_schema = current_schema()")
.select<{ tableName: string }[]>("table_name as tableName")
.orderBy("table_name")
).filter((el) => !el.tableName.includes("_migrations"));
).filter((el) => !el.tableName.includes("_migrations") && !el.tableName.includes("partitioned_audit_logs_"));
for (let i = 0; i < tables.length; i += 1) {
const { tableName } = tables[i];

View File

@@ -20,8 +20,7 @@ export const AuditLogsSchema = z.object({
createdAt: z.date(),
updatedAt: z.date(),
orgId: z.string().uuid().nullable().optional(),
projectId: z.string().nullable().optional(),
projectName: z.string().nullable().optional()
projectId: z.string().nullable().optional()
});
export type TAuditLogs = z.infer<typeof AuditLogsSchema>;