diff --git a/config/database/migration/5.0->6.0.sql b/config/database/migration/5.0->6.0.sql new file mode 100644 index 00000000..585ec37d --- /dev/null +++ b/config/database/migration/5.0->6.0.sql @@ -0,0 +1,5 @@ +RENAME TABLE USER TO ACCOUNT; +RENAME TABLE LABEL TO MINDMAP_LABEL; + +ALTER TABLE COLLABORATION +RENAME COLUMN colaboration_id to collaboration_id diff --git a/wise-api/src/main/java/com/wisemapping/config/common/CommonConfig.java b/wise-api/src/main/java/com/wisemapping/config/common/CommonConfig.java index 561fce36..d068f10c 100644 --- a/wise-api/src/main/java/com/wisemapping/config/common/CommonConfig.java +++ b/wise-api/src/main/java/com/wisemapping/config/common/CommonConfig.java @@ -1,7 +1,7 @@ package com.wisemapping.config.common; import com.wisemapping.dao.LabelManagerImpl; -import com.wisemapping.model.User; +import com.wisemapping.model.Account; import com.wisemapping.security.AuthenticationProvider; import com.wisemapping.security.Utils; import com.wisemapping.service.MindmapServiceImpl; @@ -26,7 +26,7 @@ public class CommonConfig { return new AcceptHeaderLocaleResolver() { @Override public Locale resolveLocale(@NotNull HttpServletRequest request) { - final User user = Utils.getUser(); + final Account user = Utils.getUser(); Locale result; if (user != null && user.getLocale() != null) { String locale = user.getLocale(); diff --git a/wise-api/src/main/java/com/wisemapping/config/common/JPAConfig.java b/wise-api/src/main/java/com/wisemapping/config/common/JPAConfig.java index 9f68abdc..87796cdf 100644 --- a/wise-api/src/main/java/com/wisemapping/config/common/JPAConfig.java +++ b/wise-api/src/main/java/com/wisemapping/config/common/JPAConfig.java @@ -1,7 +1,7 @@ package com.wisemapping.config.common; import com.wisemapping.dao.MindmapManagerImpl; -import com.wisemapping.model.User; +import com.wisemapping.model.Account; import com.wisemapping.service.MindmapServiceImpl; import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.context.annotation.Configuration; @@ -10,7 +10,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories; @Configuration @EnableJpaRepositories(basePackageClasses={MindmapServiceImpl.class, MindmapManagerImpl.class}) -@EntityScan(basePackageClasses= User.class) +@EntityScan(basePackageClasses= Account.class) public class JPAConfig { } diff --git a/wise-api/src/main/java/com/wisemapping/dao/LabelManager.java b/wise-api/src/main/java/com/wisemapping/dao/LabelManager.java index 7d0363dc..8a6f1c6d 100644 --- a/wise-api/src/main/java/com/wisemapping/dao/LabelManager.java +++ b/wise-api/src/main/java/com/wisemapping/dao/LabelManager.java @@ -1,7 +1,7 @@ package com.wisemapping.dao; -import com.wisemapping.model.Label; -import com.wisemapping.model.User; +import com.wisemapping.model.MindmapLabel; +import com.wisemapping.model.Account; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -9,18 +9,18 @@ import java.util.List; public interface LabelManager { - void addLabel(@NotNull final Label label); + void addLabel(@NotNull final MindmapLabel label); - void saveLabel(@NotNull final Label label); + void saveLabel(@NotNull final MindmapLabel label); @NotNull - List