mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-18 03:02:56 +00:00
fix: avoid postgres 100-argument limit in findRollbackById
Rolling back any application fails with PostgresError: cannot pass more than 100 arguments to a function (54023) since 0175_fantastic_peter_quill took the application table to 101 columns. findRollbackById hydrated deployment -> application -> environment -> project, so drizzle compiled all 101 application columns plus the nested blob into one json_build_array() call, above the FUNC_MAX_ARGS = 100 limit. At 99 columns it sat exactly on the limit. None of that nested data is read: the routers only use deployment.applicationId, and rollback()/removeRollbackById() read the rollback row itself. Drop the nested relations, the same shape as #4257 for findPreviewDeploymentById. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
@@ -106,19 +106,7 @@ export const findRollbackById = async (rollbackId: string) => {
|
||||
const result = await db.query.rollbacks.findFirst({
|
||||
where: eq(rollbacks.rollbackId, rollbackId),
|
||||
with: {
|
||||
deployment: {
|
||||
with: {
|
||||
application: {
|
||||
with: {
|
||||
environment: {
|
||||
with: {
|
||||
project: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
deployment: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user