refactor: sql-tools (#19717)

This commit is contained in:
Jason Rasmussen
2025-07-03 10:59:17 -04:00
committed by GitHub
parent 484529e61e
commit 6044663e26
160 changed files with 1120 additions and 1186 deletions
@@ -0,0 +1,22 @@
import { Comparer, DatabaseExtension, Reason } from 'src/sql-tools/types';
export const compareExtensions: Comparer<DatabaseExtension> = {
onMissing: (source) => [
{
type: 'ExtensionCreate',
extension: source,
reason: Reason.MissingInTarget,
},
],
onExtra: (target) => [
{
type: 'ExtensionDrop',
extensionName: target.name,
reason: Reason.MissingInSource,
},
],
onCompare: () => {
// if the name matches they are the same
return [];
},
};