mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
11 lines
361 B
TypeScript
11 lines
361 B
TypeScript
|
|
import { Processor } from 'src/sql-tools/from-code/processors/type';
|
||
|
|
import { asSnakeCase } from 'src/sql-tools/helpers';
|
||
|
|
|
||
|
|
export const processDatabases: Processor = (builder, items) => {
|
||
|
|
for (const {
|
||
|
|
item: { object, options },
|
||
|
|
} of items.filter((item) => item.type === 'database')) {
|
||
|
|
builder.name = options.name || asSnakeCase(object.name);
|
||
|
|
}
|
||
|
|
};
|