Skip to content

Commit

Permalink
fix: Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
larshelge committed Oct 16, 2024
1 parent 0ad587e commit 7ca2e31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ public class Dashboard extends BaseNameableObject implements MetadataObject {
private List<String> allowedFilters = new ArrayList<>();

/**
* Provider of embedded dashboards. The {@link EmbeddedProvider#NATIVE} value refers to
* non-embedded, standard DHIS 2 dashboards. Other values indicate that this dashboard is sourced
* from an external provider and embedded into DHIS 2. Not null.
* Provider of embedded dashboards. The {@link EmbeddedProvider#NONE} value refers to standard
* DHIS 2 dashboards. Other values indicate that this dashboard is sourced from an external
* provider and embedded into DHIS 2. Not null.
*/
private EmbeddedProvider embeddedProvider;

Expand All @@ -91,7 +91,7 @@ public class Dashboard extends BaseNameableObject implements MetadataObject {
// -------------------------------------------------------------------------

public Dashboard() {
this.embeddedProvider = EmbeddedProvider.NATIVE;
this.embeddedProvider = EmbeddedProvider.NONE;
}

public Dashboard(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
* @author Lars Helge Overland
*/
public enum EmbeddedProvider {
NATIVE,
NONE,
SUPERSET;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- Add various embedded dashboard property columns to dashboard table

alter table "dashboard" add column if not exists "embeddedprovider" varchar(50);
update "dashboard" set "embeddedprovider" = 'NATIVE' where "embeddedprovider" is null;
update "dashboard" set "embeddedprovider" = 'NONE' where "embeddedprovider" is null;
alter table "dashboard" alter column "embeddedprovider" set not null;

alter table "dashboard" add column if not exists "embeddedid" varchar(255);
Expand Down

0 comments on commit 7ca2e31

Please sign in to comment.