mirror of
https://github.com/theotherp/nzbhydra2.git
synced 2026-02-06 11:17:18 +00:00
Fuck this more
This commit is contained in:
parent
b5b3762a70
commit
37fd3ae76d
@ -1,84 +1,84 @@
|
||||
package org.nzbhydra.downloading;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Convert;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Index;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import org.nzbhydra.config.SearchSource;
|
||||
import org.nzbhydra.config.downloading.FileDownloadAccessType;
|
||||
import org.nzbhydra.searching.db.SearchResultEntity;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
import org.nzbhydra.web.SessionStorage;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@Table(name = "indexernzbdownload", indexes = {@Index(name = "NZB_DOWNLOAD_EXT_ID", columnList = "EXTERNAL_ID")})
|
||||
public final class FileDownloadEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
@ManyToOne
|
||||
@JsonIgnoreProperties(value = {"handler", "hibernateLazyInitializer"})
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private SearchResultEntity searchResult;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FileDownloadAccessType nzbAccessType;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private SearchSource accessSource;
|
||||
@Convert(converter = org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters.InstantConverter.class)
|
||||
private Instant time = Instant.now();
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FileDownloadStatus status;
|
||||
private String error;
|
||||
private String username;
|
||||
private String ip;
|
||||
private String userAgent;
|
||||
/**
|
||||
* The age of the NZB at the time of downloading.
|
||||
*/
|
||||
private Integer age;
|
||||
@Column(name = "EXTERNAL_ID")
|
||||
private String externalId;
|
||||
|
||||
public FileDownloadEntity(SearchResultEntity searchResult, FileDownloadAccessType nzbAccessType, SearchSource accessSource, FileDownloadStatus status, String error) {
|
||||
this.searchResult = searchResult;
|
||||
this.nzbAccessType = nzbAccessType;
|
||||
this.accessSource = accessSource;
|
||||
this.status = status;
|
||||
this.time = Instant.now();
|
||||
this.username = SessionStorage.username.get();
|
||||
this.userAgent = SessionStorage.userAgent.get();
|
||||
this.ip = SessionStorage.IP.get();
|
||||
this.age = (int) (Duration.between(searchResult.getPubDate(), searchResult.getFirstFound()).get(ChronoUnit.SECONDS) / (24 * 60 * 60));
|
||||
setError(error);
|
||||
}
|
||||
|
||||
public void setError(String error) {
|
||||
if (error != null && error.length() > 4000) {
|
||||
this.error = error.substring(0,4000);
|
||||
} else {
|
||||
this.error = error;
|
||||
}
|
||||
}
|
||||
|
||||
public FileDownloadEntity() {
|
||||
this.time = Instant.now();
|
||||
}
|
||||
}
|
||||
package org.nzbhydra.downloading;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Convert;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Index;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import org.nzbhydra.config.SearchSource;
|
||||
import org.nzbhydra.config.downloading.FileDownloadAccessType;
|
||||
import org.nzbhydra.searching.db.SearchResultEntity;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
import org.nzbhydra.web.SessionStorage;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@Table(name = "indexernzbdownload", indexes = {@Index(name = "NZB_DOWNLOAD_EXT_ID", columnList = "EXTERNAL_ID")})
|
||||
public final class FileDownloadEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
@ManyToOne
|
||||
@JsonIgnoreProperties(value = {"handler", "hibernateLazyInitializer"})
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private SearchResultEntity searchResult;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FileDownloadAccessType nzbAccessType;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private SearchSource accessSource;
|
||||
@Convert(converter = org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters.InstantConverter.class)
|
||||
private Instant time = Instant.now();
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FileDownloadStatus status;
|
||||
private String error;
|
||||
private String username;
|
||||
private String ip;
|
||||
private String userAgent;
|
||||
/**
|
||||
* The age of the NZB at the time of downloading.
|
||||
*/
|
||||
private Integer age;
|
||||
@Column(name = "EXTERNAL_ID")
|
||||
private String externalId;
|
||||
|
||||
public FileDownloadEntity(SearchResultEntity searchResult, FileDownloadAccessType nzbAccessType, SearchSource accessSource, FileDownloadStatus status, String error) {
|
||||
this.searchResult = searchResult;
|
||||
this.nzbAccessType = nzbAccessType;
|
||||
this.accessSource = accessSource;
|
||||
this.status = status;
|
||||
this.time = Instant.now();
|
||||
this.username = SessionStorage.username.get();
|
||||
this.userAgent = SessionStorage.userAgent.get();
|
||||
this.ip = SessionStorage.IP.get();
|
||||
this.age = (int) (Duration.between(searchResult.getPubDate(), searchResult.getFirstFound()).get(ChronoUnit.SECONDS) / (24 * 60 * 60));
|
||||
setError(error);
|
||||
}
|
||||
|
||||
public void setError(String error) {
|
||||
if (error != null && error.length() > 4000) {
|
||||
this.error = error.substring(0,4000);
|
||||
} else {
|
||||
this.error = error;
|
||||
}
|
||||
}
|
||||
|
||||
public FileDownloadEntity() {
|
||||
this.time = Instant.now();
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,85 +1,85 @@
|
||||
package org.nzbhydra.indexers;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Convert;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@Table(name = "indexerapiaccess")
|
||||
public final class IndexerApiAccessEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
protected int id;
|
||||
|
||||
@ManyToOne
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private IndexerEntity indexer;
|
||||
|
||||
@Convert(converter = org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters.InstantConverter.class)
|
||||
private Instant time;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private IndexerAccessResult result;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private IndexerApiAccessType accessType;
|
||||
private Long responseTime;
|
||||
@Column(length = 4000)
|
||||
private String error;
|
||||
//later username / user ?
|
||||
|
||||
|
||||
public IndexerApiAccessEntity(IndexerEntity indexerEntity) {
|
||||
this.indexer = indexerEntity;
|
||||
time = Instant.now();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndexerApiAccessEntity that = (IndexerApiAccessEntity) o;
|
||||
return id == that.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("time", time)
|
||||
.add("result", result)
|
||||
.add("accessType", accessType)
|
||||
.add("responseTime", responseTime)
|
||||
.add("error", error)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
package org.nzbhydra.indexers;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Convert;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@Table(name = "indexerapiaccess")
|
||||
public final class IndexerApiAccessEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
protected int id;
|
||||
|
||||
@ManyToOne
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private IndexerEntity indexer;
|
||||
|
||||
@Convert(converter = org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters.InstantConverter.class)
|
||||
private Instant time;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private IndexerAccessResult result;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private IndexerApiAccessType accessType;
|
||||
private Long responseTime;
|
||||
@Column(length = 4000)
|
||||
private String error;
|
||||
//later username / user ?
|
||||
|
||||
|
||||
public IndexerApiAccessEntity(IndexerEntity indexerEntity) {
|
||||
this.indexer = indexerEntity;
|
||||
time = Instant.now();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndexerApiAccessEntity that = (IndexerApiAccessEntity) o;
|
||||
return id == that.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("time", time)
|
||||
.add("result", result)
|
||||
.add("accessType", accessType)
|
||||
.add("responseTime", responseTime)
|
||||
.add("error", error)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,60 +1,60 @@
|
||||
package org.nzbhydra.indexers;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@Table(name = "indexer")
|
||||
public class IndexerEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
|
||||
@Column(unique = true)
|
||||
private String name;
|
||||
|
||||
public IndexerEntity() {
|
||||
}
|
||||
|
||||
public IndexerEntity(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndexerEntity that = (IndexerEntity) o;
|
||||
return id == that.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("id", id)
|
||||
.add("name", name)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
package org.nzbhydra.indexers;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@Table(name = "indexer")
|
||||
public class IndexerEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
|
||||
@Column(unique = true)
|
||||
private String name;
|
||||
|
||||
public IndexerEntity() {
|
||||
}
|
||||
|
||||
public IndexerEntity(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndexerEntity that = (IndexerEntity) o;
|
||||
return id == that.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("id", id)
|
||||
.add("name", name)
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,68 +1,68 @@
|
||||
package org.nzbhydra.indexers;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Index;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import org.nzbhydra.searching.db.SearchEntity;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@Table(name = "indexersearch", indexes = {@Index(name = "ISINDEX1", columnList = "INDEXER_ENTITY_ID"), @Index(name = "ISINDEX2", columnList = "SEARCH_ENTITY_ID")})
|
||||
public final class IndexerSearchEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
|
||||
@ManyToOne
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private IndexerEntity indexerEntity;
|
||||
@ManyToOne
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private SearchEntity searchEntity;
|
||||
|
||||
private Boolean successful;
|
||||
|
||||
/**
|
||||
* Number of total results reported by the indexer
|
||||
*/
|
||||
private Integer resultsCount;
|
||||
|
||||
public IndexerSearchEntity() {
|
||||
}
|
||||
|
||||
public IndexerSearchEntity(IndexerEntity indexerEntity, SearchEntity searchEntity, int id) {
|
||||
this.indexerEntity = indexerEntity;
|
||||
this.searchEntity = searchEntity;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndexerSearchEntity entity = (IndexerSearchEntity) o;
|
||||
return id == entity.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id);
|
||||
}
|
||||
}
|
||||
package org.nzbhydra.indexers;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Index;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import org.nzbhydra.searching.db.SearchEntity;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@Data
|
||||
@ReflectionMarker
|
||||
@Entity
|
||||
@Table(name = "indexersearch", indexes = {@Index(name = "ISINDEX1", columnList = "INDEXER_ENTITY_ID"), @Index(name = "ISINDEX2", columnList = "SEARCH_ENTITY_ID")})
|
||||
public final class IndexerSearchEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
|
||||
@ManyToOne
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private IndexerEntity indexerEntity;
|
||||
@ManyToOne
|
||||
@OnDelete(action = OnDeleteAction.CASCADE)
|
||||
private SearchEntity searchEntity;
|
||||
|
||||
private Boolean successful;
|
||||
|
||||
/**
|
||||
* Number of total results reported by the indexer
|
||||
*/
|
||||
private Integer resultsCount;
|
||||
|
||||
public IndexerSearchEntity() {
|
||||
}
|
||||
|
||||
public IndexerSearchEntity(IndexerEntity indexerEntity, SearchEntity searchEntity, int id) {
|
||||
this.indexerEntity = indexerEntity;
|
||||
this.searchEntity = searchEntity;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
IndexerSearchEntity entity = (IndexerSearchEntity) o;
|
||||
return id == entity.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,8 +19,8 @@ package org.nzbhydra.searching.db;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.SequenceGenerator;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nzbhydra.springnative.ReflectionMarker;
|
||||
@ -35,8 +35,9 @@ import java.util.Objects;
|
||||
public final class IdentifierKeyValuePair {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@GeneratedValue
|
||||
@JsonIgnore
|
||||
@SequenceGenerator(allocationSize = 1, name = "IDENTIFIER_KEY_VALUE_PAIR_SEQ")
|
||||
private Integer id;
|
||||
|
||||
public IdentifierKeyValuePair(String identifierKey, String identifierValue) {
|
||||
|
||||
@ -23,16 +23,13 @@ spring.profiles.active=default
|
||||
|
||||
|
||||
#Database connection, hibernate config
|
||||
spring.datasource.url=jdbc:sqlite:${nzbhydra.dataFolder:.}/database/nzbhydra.db
|
||||
spring.datasource.jdbc-url=jdbc:sqlite:${nzbhydra.dataFolder:.}/database/nzbhydra.db
|
||||
spring.datasource.username=
|
||||
spring.datasource.password=
|
||||
spring.datasource.driver-class-name=org.sqlite.JDBC
|
||||
|
||||
# SQLite connection pooling settings are configured in SQLiteConfiguration.java
|
||||
|
||||
# SQLite-specific JPA settings for multithreading
|
||||
# Let Hibernate auto-detect the dialect for SQLite
|
||||
spring.datasource.url=jdbc:h2:file:${nzbhydra.dataFolder:.}/database/nzbhydra;MAX_COMPACT_TIME=${main.databaseCompactTime:15000};WRITE_DELAY=${main.databaseWriteDelay:5000};TRACE_MAX_FILE_SIZE=16;RETENTION_TIME=${main.databaseRetentionTime:1000};NON_KEYWORDS=YEAR,DATA,KEY
|
||||
spring.datasource.jdbc-url=jdbc:h2:file:${nzbhydra.dataFolder:.}/database/nzbhydra;MAX_COMPACT_TIME=${main.databaseCompactTime:15000};WRITE_DELAY=${main.databaseWriteDelay:5000};TRACE_MAX_FILE_SIZE=16;RETENTION_TIME=${main.databaseRetentionTime:1000};NON_KEYWORDS=YEAR,DATA,KEY
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=sa
|
||||
spring.datasource.driver-class-name=org.h2.Driver
|
||||
spring.jpa.database-platform=org.nzbhydra.database.H2DialectExtended
|
||||
spring.jpa.properties.hibernate.dialect=org.nzbhydra.database.H2DialectExtended
|
||||
spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
|
||||
spring.jpa.properties.hibernate.show_sql=false
|
||||
spring.jpa.properties.hibernate.use_sql_comments=false
|
||||
@ -48,8 +45,9 @@ spring.h2.console.enabled=false
|
||||
#Migration
|
||||
spring.flyway.enabled=true
|
||||
spring.flyway.locations=classpath:/migration,classpath:/org/nzbhydra/database/migration
|
||||
# For fresh databases, let Hibernate create the schema
|
||||
spring.jpa.hibernate.ddl-auto=validate
|
||||
spring.flyway.schemas=PUBLIC
|
||||
#spring.flyway.baseline-on-migrate=true
|
||||
#spring.flyway.ignore-future-migrations=false
|
||||
|
||||
#Jackson stuff
|
||||
spring.jackson.deserialization.unwrap-single-value-arrays=true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user