-
-
Notifications
You must be signed in to change notification settings - Fork 18
feat: update SavedDbQueryEntity and migration for widget properties management #1558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -27,7 +27,7 @@ export class SavedDbQueryEntity { | |||||
| @Column({ type: 'text', default: null, nullable: true }) | ||||||
| description: string | null; | ||||||
|
|
||||||
| @Column({ type: 'varchar' }) | ||||||
| @Column({ type: 'varchar', nullable: true, default: DashboardWidgetTypeEnum.Chart }) | ||||||
| widget_type: DashboardWidgetTypeEnum; | ||||||
|
|
||||||
| @Column({ type: 'varchar', default: null, nullable: true }) | ||||||
|
|
@@ -36,7 +36,7 @@ export class SavedDbQueryEntity { | |||||
| @Column('json', { default: null, nullable: true }) | ||||||
| widget_options: string | null; | ||||||
|
|
||||||
| @Column({ type: 'text' }) | ||||||
| @Column({ type: 'text', nullable: true, default: null }) | ||||||
| query_text: string; | ||||||
|
||||||
| query_text: string; | |
| query_text: string | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TypeScript type for widget_type is declared as non-nullable (DashboardWidgetTypeEnum), but the column decorator marks it as nullable with a default value. This creates a type mismatch. The property type should be changed to 'DashboardWidgetTypeEnum | null' to accurately reflect the database schema, or the nullable option should be removed if widget_type should always have a value.