delete removed settings

This commit is contained in:
Athou
2023-05-05 17:48:30 +02:00
parent 49e37587f9
commit b1b5eeb0e0
6 changed files with 30 additions and 38 deletions

View File

@@ -230,7 +230,6 @@ export interface Settings {
readingOrder: ReadingOrder
showRead: boolean
scrollMarks: boolean
theme?: string
customCss?: string
scrollSpeed: number
sharingSettings: SharingSettings

View File

@@ -46,19 +46,12 @@ public class UserSettings extends AbstractModel {
@Column(nullable = false)
private ReadingOrder readingOrder;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private ViewMode viewMode;
@Column(name = "user_lang", length = 4)
private String language;
private boolean showRead;
private boolean scrollMarks;
@Column(length = 32)
private String theme;
@Lob
@Column(length = Integer.MAX_VALUE)
@Type(type = "org.hibernate.type.TextType")

View File

@@ -20,18 +20,12 @@ public class Settings implements Serializable {
@ApiModelProperty(value = "user reads entries in ascending or descending order", allowableValues = "asc,desc", required = true)
private String readingOrder;
@ApiModelProperty(value = "user viewing mode, either title-only or expande view", allowableValues = "title,expanded", required = true)
private String viewMode;
@ApiModelProperty(value = "user wants category and feeds with no unread entries shown", required = true)
private boolean showRead;
@ApiModelProperty(value = "In expanded view, scroll through entries mark them as read", required = true)
private boolean scrollMarks;
@ApiModelProperty(value = "user's selected theme")
private String theme;
@ApiModelProperty(value = "user's custom css for the website")
private String customCss;

View File

@@ -39,7 +39,6 @@ import com.commafeed.backend.model.UserRole.Role;
import com.commafeed.backend.model.UserSettings;
import com.commafeed.backend.model.UserSettings.ReadingMode;
import com.commafeed.backend.model.UserSettings.ReadingOrder;
import com.commafeed.backend.model.UserSettings.ViewMode;
import com.commafeed.backend.service.MailService;
import com.commafeed.backend.service.PasswordEncryptionService;
import com.commafeed.backend.service.UserService;
@@ -88,7 +87,6 @@ public class UserREST {
if (settings != null) {
s.setReadingMode(settings.getReadingMode().name());
s.setReadingOrder(settings.getReadingOrder().name());
s.setViewMode(settings.getViewMode().name());
s.setShowRead(settings.isShowRead());
s.getSharingSettings().setEmail(settings.isEmail());
@@ -101,16 +99,13 @@ public class UserREST {
s.getSharingSettings().setBuffer(settings.isBuffer());
s.setScrollMarks(settings.isScrollMarks());
s.setTheme(settings.getTheme());
s.setCustomCss(settings.getCustomCss());
s.setLanguage(settings.getLanguage());
s.setScrollSpeed(settings.getScrollSpeed());
} else {
s.setReadingMode(ReadingMode.unread.name());
s.setReadingOrder(ReadingOrder.desc.name());
s.setViewMode(ViewMode.title.name());
s.setShowRead(true);
s.setTheme("default");
s.getSharingSettings().setEmail(true);
s.getSharingSettings().setGmail(true);
@@ -144,9 +139,7 @@ public class UserREST {
s.setReadingMode(ReadingMode.valueOf(settings.getReadingMode()));
s.setReadingOrder(ReadingOrder.valueOf(settings.getReadingOrder()));
s.setShowRead(settings.isShowRead());
s.setViewMode(ViewMode.valueOf(settings.getViewMode()));
s.setScrollMarks(settings.isScrollMarks());
s.setTheme(settings.getTheme());
s.setCustomCss(settings.getCustomCss());
s.setLanguage(settings.getLanguage());
s.setScrollSpeed(settings.getScrollSpeed());

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="delete-removed-settings" author="athou">
<dropColumn tableName="USERSETTINGS" columnName="theme" />
<dropColumn tableName="USERSETTINGS" columnName="viewMode" />
</changeSet>
</databaseChangeLog>

View File

@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<property name="blob_type" value="bytea" dbms="postgresql"/>
<property name="blob_type" value="blob" dbms="h2" />
<property name="blob_type" value="blob" dbms="mysql,mariadb" />
<property name="blob_type" value="blob" dbms="mssql" />
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<property name="blob_type" value="bytea" dbms="postgresql"/>
<property name="blob_type" value="blob" dbms="h2"/>
<property name="blob_type" value="blob" dbms="mysql,mariadb"/>
<property name="blob_type" value="blob" dbms="mssql"/>
<include file="changelogs/db.changelog-1.0.xml"/>
<include file="changelogs/db.changelog-1.1.xml"/>
<include file="changelogs/db.changelog-1.2.xml"/>
<include file="changelogs/db.changelog-1.3.xml"/>
<include file="changelogs/db.changelog-1.4.xml"/>
<include file="changelogs/db.changelog-1.5.xml"/>
<include file="changelogs/db.changelog-2.1.xml"/>
<include file="changelogs/db.changelog-2.2.xml"/>
<include file="changelogs/db.changelog-2.6.xml"/>
<include file="changelogs/db.changelog-3.2.xml"/>
<include file="changelogs/db.changelog-1.0.xml" />
<include file="changelogs/db.changelog-1.1.xml" />
<include file="changelogs/db.changelog-1.2.xml" />
<include file="changelogs/db.changelog-1.3.xml" />
<include file="changelogs/db.changelog-1.4.xml" />
<include file="changelogs/db.changelog-1.5.xml" />
<include file="changelogs/db.changelog-2.1.xml" />
<include file="changelogs/db.changelog-2.2.xml" />
<include file="changelogs/db.changelog-2.6.xml" />
</databaseChangeLog>