mirror of
https://github.com/immich-app/immich.git
synced 2026-03-23 20:49:36 +03:00
25 lines
561 B
TypeScript
25 lines
561 B
TypeScript
import { Comparer, DatabaseParameter, Reason } from 'src/sql-tools/types';
|
|
|
|
export const compareParameters = (): Comparer<DatabaseParameter> => ({
|
|
onMissing: (source) => [
|
|
{
|
|
type: 'ParameterSet',
|
|
parameter: source,
|
|
reason: Reason.MissingInTarget,
|
|
},
|
|
],
|
|
onExtra: (target) => [
|
|
{
|
|
type: 'ParameterReset',
|
|
databaseName: target.databaseName,
|
|
tableName: target.tableName,
|
|
parameterName: target.name,
|
|
reason: Reason.MissingInSource,
|
|
},
|
|
],
|
|
onCompare: () => {
|
|
// TODO
|
|
return [];
|
|
},
|
|
});
|