chore:little fixes and formating and linting and patches
This commit is contained in:
@@ -35,7 +35,7 @@ export async function up() {
|
||||
Array.isArray(events) &&
|
||||
events.length > 0 &&
|
||||
events.some(
|
||||
(event) => !event || typeof event !== 'object' || !('type' in event),
|
||||
(event) => !event || typeof event !== 'object' || !('type' in event)
|
||||
);
|
||||
|
||||
// Check if formula exists and isn't already in the series
|
||||
@@ -46,13 +46,13 @@ export async function up() {
|
||||
item &&
|
||||
typeof item === 'object' &&
|
||||
'type' in item &&
|
||||
item.type === 'formula',
|
||||
item.type === 'formula'
|
||||
);
|
||||
|
||||
const needsFormulaMigration = !!oldFormula && !hasFormulaInSeries;
|
||||
|
||||
// Skip if no migration needed
|
||||
if (!needsEventMigration && !needsFormulaMigration) {
|
||||
if (!(needsEventMigration || needsFormulaMigration)) {
|
||||
skippedCount++;
|
||||
continue;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ export async function up() {
|
||||
}
|
||||
|
||||
console.log(
|
||||
`Updating report ${report.name} (${report.id}) with ${migratedSeries.length} series`,
|
||||
`Updating report ${report.name} (${report.id}) with ${migratedSeries.length} series`
|
||||
);
|
||||
// Update the report with migrated series
|
||||
await db.report.update({
|
||||
|
||||
Reference in New Issue
Block a user