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
+1 -1
View File
@@ -90,7 +90,7 @@ const main = async () => {
.whereRaw("table_schema = current_schema()") .whereRaw("table_schema = current_schema()")
.select<{ tableName: string }[]>("table_name as tableName") .select<{ tableName: string }[]>("table_name as tableName")
.orderBy("table_name") .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) { for (let i = 0; i < tables.length; i += 1) {
const { tableName } = tables[i]; const { tableName } = tables[i];
+1 -2
View File
@@ -20,8 +20,7 @@ export const AuditLogsSchema = z.object({
createdAt: z.date(), createdAt: z.date(),
updatedAt: z.date(), updatedAt: z.date(),
orgId: z.string().uuid().nullable().optional(), orgId: z.string().uuid().nullable().optional(),
projectId: z.string().nullable().optional(), projectId: z.string().nullable().optional()
projectName: z.string().nullable().optional()
}); });
export type TAuditLogs = z.infer<typeof AuditLogsSchema>; export type TAuditLogs = z.infer<typeof AuditLogsSchema>;