mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
17 lines
543 B
TypeScript
17 lines
543 B
TypeScript
|
|
import { Processor } from 'src/sql-tools/from-code/processors/type';
|
||
|
|
import { fromColumnValue } from 'src/sql-tools/helpers';
|
||
|
|
|
||
|
|
export const processConfigurationParameters: Processor = (builder, items) => {
|
||
|
|
for (const {
|
||
|
|
item: { options },
|
||
|
|
} of items.filter((item) => item.type === 'configurationParameter')) {
|
||
|
|
builder.parameters.push({
|
||
|
|
databaseName: builder.name,
|
||
|
|
name: options.name,
|
||
|
|
value: fromColumnValue(options.value),
|
||
|
|
scope: options.scope,
|
||
|
|
synchronize: options.synchronize ?? true,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
};
|