mirror of
https://github.com/immich-app/immich.git
synced 2026-02-14 12:58:17 +03:00
23 lines
520 B
TypeScript
23 lines
520 B
TypeScript
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 [];
|
|
},
|
|
});
|