Skip to content

Commit f301494

Browse files
chore: remove debug console logs
Co-Authored-By: Dan Lynch <[email protected]>
1 parent 94a7bbc commit f301494

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

packages/core/src/migrate/client.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ export class LaunchQLMigrate {
172172

173173
try {
174174
// Call the deploy stored procedure
175-
console.log('DEBUG: About to deploy change:', change.name, 'in project:', project || plan.project);
176175
await executeQuery(
177176
context,
178177
'CALL launchql_migrate.deploy($1, $2, $3, $4, $5)',
@@ -185,13 +184,6 @@ export class LaunchQLMigrate {
185184
]
186185
);
187186

188-
const verifyResult = await executeQuery(
189-
context,
190-
'SELECT * FROM launchql_migrate.changes WHERE project = $1 AND change_name = $2',
191-
[project || plan.project, change.name]
192-
);
193-
console.log('DEBUG: Change record after deploy:', JSON.stringify(verifyResult.rows, null, 2));
194-
195187
deployed.push(change.name);
196188
log.success(`Successfully deployed: ${change.name}`);
197189
} catch (error) {
@@ -230,42 +222,34 @@ export class LaunchQLMigrate {
230222
let resolvedDeps: any = null;
231223
if (hasTagDependencies) {
232224
const parentDir = dirname(dirname(packageDir));
233-
console.log('DEBUG: Using parent directory for resolution:', parentDir);
234225
resolvedDeps = resolveDependencies(parentDir, fullPlanResult.data?.project || plan.project, {
235226
tagResolution: 'internal',
236227
loadPlanFiles: true
237228
});
238-
console.log('DEBUG: resolvedDeps:', JSON.stringify(resolvedDeps, null, 2));
239229
}
240230

241231
let resolvedToChange = toChange;
242232
let targetProject = project || plan.project;
243233
let targetChangeName = toChange;
244234

245235
if (toChange && toChange.includes('@')) {
246-
console.log('DEBUG: Processing toChange:', toChange);
247236
if (toChange.includes(':@')) {
248237
const [crossProject, tag] = toChange.split(':@');
249238
targetProject = crossProject;
250-
console.log('DEBUG: Cross-module case - targetProject:', targetProject, 'tag:', tag);
251239
const parentDir = dirname(dirname(packageDir));
252240
const targetPlanPath = join(parentDir, 'packages', crossProject, 'launchql.plan');
253-
console.log('DEBUG: Looking for target plan at:', targetPlanPath);
254241

255242
try {
256243
const resolvedChange = resolveTagToChangeName(targetPlanPath, `@${tag}`, crossProject);
257244
targetChangeName = resolvedChange;
258245
resolvedToChange = resolvedChange;
259-
console.log('DEBUG: Resolved cross-module tag to:', resolvedChange);
260246
} catch (error) {
261-
console.log('DEBUG: Failed to resolve cross-module tag, using original:', toChange);
262247
resolvedToChange = toChange;
263248
targetChangeName = toChange;
264249
}
265250
} else {
266251
resolvedToChange = resolveTagToChangeName(planPath, toChange, project || plan.project);
267252
targetChangeName = resolvedToChange;
268-
console.log('DEBUG: Local tag resolved to:', resolvedToChange);
269253
}
270254
}
271255

@@ -292,7 +276,6 @@ export class LaunchQLMigrate {
292276

293277
if (resolvedDeps && resolvedDeps.resolvedTags && resolvedDeps.resolvedTags[toChange]) {
294278
const resolvedTag = resolvedDeps.resolvedTags[toChange];
295-
console.log('DEBUG: Using resolved tag:', resolvedTag);
296279

297280
if (resolvedTag.includes(':')) {
298281
const [resolvedProject, resolvedChange] = resolvedTag.split(':', 2);
@@ -303,21 +286,11 @@ export class LaunchQLMigrate {
303286
}
304287
}
305288

306-
console.log('DEBUG: Checking deployment for project:', actualTargetProject, 'change:', actualTargetChangeName);
307-
308-
const allChangesResult = await executeQuery(
309-
context,
310-
'SELECT project, change_name, deployed_at FROM launchql_migrate.changes ORDER BY deployed_at',
311-
[]
312-
);
313-
console.log('DEBUG: All changes in DB (including NULL deployed_at):', JSON.stringify(allChangesResult.rows, null, 2));
314-
315289
const targetDeployedResult = await executeQuery(
316290
context,
317291
'SELECT launchql_migrate.is_deployed($1, $2) as is_deployed',
318292
[actualTargetProject, actualTargetChangeName]
319293
);
320-
console.log('DEBUG: is_deployed result:', targetDeployedResult.rows[0]);
321294

322295
if (!targetDeployedResult.rows[0]?.is_deployed) {
323296
log.warn(`Target change ${targetProject}:${actualTargetChangeName} is not deployed, stopping revert`);

0 commit comments

Comments
 (0)