Skip to content

Commit

Permalink
Merge pull request OneUptime#1677 from OneUptime/oneuptime-copilot-on…
Browse files Browse the repository at this point in the history
…euptime-copilot-improve-comments-PSJqs

Improved comments on /App/FeatureSet/Workers/DataMigrations/AddAttributesColumnToSpanAndLog.ts
  • Loading branch information
simlarsen authored Sep 8, 2024
2 parents cc1a4df + 72ebef1 commit 9b981f1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class AddAttributeColumnToSpanAndLog extends DataMigrationBase {
}

public async addAttributesColumnToLog(): Promise<void> {
// logs
// Find the 'attributes' column for logs
const logsAttributesColumn: AnalyticsTableColumn | undefined =
new Log().tableColumns.find((column: AnalyticsTableColumn) => {
return column.key === "attributes";
Expand All @@ -27,6 +27,7 @@ export default class AddAttributeColumnToSpanAndLog extends DataMigrationBase {
return;
}

// Check if the column type exists in the database
const columnType: TableColumnType | null =
await LogService.getColumnTypeInDatabase(logsAttributesColumn);

Expand All @@ -37,8 +38,7 @@ export default class AddAttributeColumnToSpanAndLog extends DataMigrationBase {
}

public async addAttributesColumnToSpan(): Promise<void> {
// spans

// Find the 'attributes' column for spans
const spansAttributesColumn: AnalyticsTableColumn | undefined =
new Span().tableColumns.find((column: AnalyticsTableColumn) => {
return column.key === "attributes";
Expand All @@ -48,6 +48,7 @@ export default class AddAttributeColumnToSpanAndLog extends DataMigrationBase {
return;
}

// Check if the column type exists in the database
const spansColumnType: TableColumnType | null =
await SpanService.getColumnTypeInDatabase(spansAttributesColumn);

Expand Down

0 comments on commit 9b981f1

Please sign in to comment.