Skip to content
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

[Multi-Database Support] Optimize column define case sensitivity #4776

Merged
merged 2 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Apollo 2.2.0
* [[Multi-Database Support] Optimize table case](https://github.com/apolloconfig/apollo/pull/4768)
* [Fix OIDC logout unnecessary redirect](https://github.com/apolloconfig/apollo/pull/4773)
* [[Multi-Database Support] Introduce h2 postgre profile properties to let user config database config](https://github.com/apolloconfig/apollo/pull/4766)
* [[Multi-Database Support] Optimize column define case sensitivity](https://github.com/apolloconfig/apollo/pull/4776)

------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/13?closed=1)
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
@Where(clause = "IsDeleted = false")
public class AccessKey extends BaseEntity {

@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "Secret", nullable = false)
@Column(name = "`Secret`", nullable = false)
private String secret;

@Column(name = "IsEnabled", columnDefinition = "Bit default '0'")
@Column(name = "`IsEnabled`", columnDefinition = "Bit default '0'")
private boolean enabled;

public String getAppId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ public enum OP {
INSERT, UPDATE, DELETE
}

@Column(name = "EntityName", nullable = false)
@Column(name = "`EntityName`", nullable = false)
private String entityName;

@Column(name = "EntityId")
@Column(name = "`EntityId`")
private Long entityId;

@Column(name = "OpName", nullable = false)
@Column(name = "`OpName`", nullable = false)
private String opName;

@Column(name = "Comment")
@Column(name = "`Comment`")
private String comment;

public String getComment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
@Where(clause = "IsDeleted = false")
public class Cluster extends BaseEntity implements Comparable<Cluster> {

@Column(name = "Name", nullable = false)
@Column(name = "`Name`", nullable = false)
private String name;

@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "ParentClusterId", nullable = false)
@Column(name = "`ParentClusterId`", nullable = false)
private long parentClusterId;

public String getAppId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
public class Commit extends BaseEntity {

@Lob
@Column(name = "ChangeSets", nullable = false)
@Column(name = "`ChangeSets`", nullable = false)
private String changeSets;

@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "ClusterName", nullable = false)
@Column(name = "`ClusterName`", nullable = false)
private String clusterName;

@Column(name = "NamespaceName", nullable = false)
@Column(name = "`NamespaceName`", nullable = false)
private String namespaceName;

@Column(name = "Comment")
@Column(name = "`Comment`")
private String comment;

public String getChangeSets() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@
@Where(clause = "IsDeleted = false")
public class GrayReleaseRule extends BaseEntity{

@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "ClusterName", nullable = false)
@Column(name = "`ClusterName`", nullable = false)
private String clusterName;

@Column(name = "NamespaceName", nullable = false)
@Column(name = "`NamespaceName`", nullable = false)
private String namespaceName;

@Column(name = "BranchName", nullable = false)
@Column(name = "`BranchName`", nullable = false)
private String branchName;

@Column(name = "Rules")
@Column(name = "`Rules`")
private String rules;

@Column(name = "ReleaseId", nullable = false)
@Column(name = "`ReleaseId`", nullable = false)
private Long releaseId;

@Column(name = "BranchStatus", nullable = false)
@Column(name = "`BranchStatus`", nullable = false)
private int branchStatus;

public String getAppId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@
public class Instance {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Id")
@Column(name = "`Id`")
private long id;

@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "ClusterName", nullable = false)
@Column(name = "`ClusterName`", nullable = false)
private String clusterName;

@Column(name = "DataCenter", nullable = false)
@Column(name = "`DataCenter`", nullable = false)
private String dataCenter;

@Column(name = "Ip", nullable = false)
@Column(name = "`Ip`", nullable = false)
private String ip;

@Column(name = "DataChange_CreatedTime", nullable = false)
@Column(name = "`DataChange_CreatedTime`", nullable = false)
private Date dataChangeCreatedTime;

@Column(name = "DataChange_LastTime")
@Column(name = "`DataChange_LastTime`")
private Date dataChangeLastModifiedTime;

@PrePersist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,31 @@
public class InstanceConfig {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Id")
@Column(name = "`Id`")
private long id;

@Column(name = "InstanceId")
@Column(name = "`InstanceId`")
private long instanceId;

@Column(name = "ConfigAppId", nullable = false)
@Column(name = "`ConfigAppId`", nullable = false)
private String configAppId;

@Column(name = "ConfigClusterName", nullable = false)
@Column(name = "`ConfigClusterName`", nullable = false)
private String configClusterName;

@Column(name = "ConfigNamespaceName", nullable = false)
@Column(name = "`ConfigNamespaceName`", nullable = false)
private String configNamespaceName;

@Column(name = "ReleaseKey", nullable = false)
@Column(name = "`ReleaseKey`", nullable = false)
private String releaseKey;

@Column(name = "ReleaseDeliveryTime", nullable = false)
@Column(name = "`ReleaseDeliveryTime`", nullable = false)
private Date releaseDeliveryTime;

@Column(name = "DataChange_CreatedTime", nullable = false)
@Column(name = "`DataChange_CreatedTime`", nullable = false)
private Date dataChangeCreatedTime;

@Column(name = "DataChange_LastTime")
@Column(name = "`DataChange_LastTime`")
private Date dataChangeLastModifiedTime;

@PrePersist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@Where(clause = "IsDeleted = false")
public class Item extends BaseEntity {

@Column(name = "NamespaceId", nullable = false)
@Column(name = "`NamespaceId`", nullable = false)
private long namespaceId;

@Column(name = "`Key`", nullable = false)
Expand All @@ -45,10 +45,10 @@ public class Item extends BaseEntity {
@Lob
private String value;

@Column(name = "Comment")
@Column(name = "`Comment`")
private String comment;

@Column(name = "LineNum")
@Column(name = "`LineNum`")
private Integer lineNum;

public String getComment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
@Where(clause = "IsDeleted = false")
public class Namespace extends BaseEntity {

@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "ClusterName", nullable = false)
@Column(name = "`ClusterName`", nullable = false)
private String clusterName;

@Column(name = "NamespaceName", nullable = false)
@Column(name = "`NamespaceName`", nullable = false)
private String namespaceName;

public Namespace(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
@Where(clause = "IsDeleted = false")
public class NamespaceLock extends BaseEntity{

@Column(name = "NamespaceId")
@Column(name = "`NamespaceId`")
private long namespaceId;

public long getNamespaceId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
@Where(clause = "IsDeleted = false")
public class Privilege extends BaseEntity {

@Column(name = "Name", nullable = false)
@Column(name = "`Name`", nullable = false)
private String name;

@Column(name = "PrivilType", nullable = false)
@Column(name = "`PrivilType`", nullable = false)
private String privilType;

@Column(name = "NamespaceId")
@Column(name = "`NamespaceId`")
private long namespaceId;

public String getName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,29 @@
@SQLDelete(sql = "Update Release set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?")
@Where(clause = "IsDeleted = false")
public class Release extends BaseEntity {
@Column(name = "ReleaseKey", nullable = false)
@Column(name = "`ReleaseKey`", nullable = false)
private String releaseKey;

@Column(name = "Name", nullable = false)
@Column(name = "`Name`", nullable = false)
private String name;

@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "ClusterName", nullable = false)
@Column(name = "`ClusterName`", nullable = false)
private String clusterName;

@Column(name = "NamespaceName", nullable = false)
@Column(name = "`NamespaceName`", nullable = false)
private String namespaceName;

@Column(name = "Configurations", nullable = false)
@Column(name = "`Configurations`", nullable = false)
@Lob
private String configurations;

@Column(name = "Comment", nullable = false)
@Column(name = "`Comment`", nullable = false)
private String comment;

@Column(name = "IsAbandoned", columnDefinition = "Bit default '0'")
@Column(name = "`IsAbandoned`", columnDefinition = "Bit default '0'")
private boolean isAbandoned;

public String getReleaseKey() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@
@SQLDelete(sql = "Update ReleaseHistory set IsDeleted = true, DeletedAt = ROUND(UNIX_TIMESTAMP(NOW(4))*1000) where Id = ?")
@Where(clause = "IsDeleted = false")
public class ReleaseHistory extends BaseEntity {
@Column(name = "AppId", nullable = false)
@Column(name = "`AppId`", nullable = false)
private String appId;

@Column(name = "ClusterName", nullable = false)
@Column(name = "`ClusterName`", nullable = false)
private String clusterName;

@Column(name = "NamespaceName", nullable = false)
@Column(name = "`NamespaceName`", nullable = false)
private String namespaceName;

@Column(name = "BranchName", nullable = false)
@Column(name = "`BranchName`", nullable = false)
private String branchName;

@Column(name = "ReleaseId")
@Column(name = "`ReleaseId`")
private long releaseId;

@Column(name = "PreviousReleaseId")
@Column(name = "`PreviousReleaseId`")
private long previousReleaseId;

@Column(name = "Operation")
@Column(name = "`Operation`")
private int operation;

@Column(name = "OperationContext", nullable = false)
@Column(name = "`OperationContext`", nullable = false)
private String operationContext;

public String getAppId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
public class ReleaseMessage {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "Id")
@Column(name = "`Id`")
private long id;

@Column(name = "Message", nullable = false)
@Column(name = "`Message`", nullable = false)
private String message;

@Column(name = "DataChange_LastTime")
@Column(name = "`DataChange_LastTime`")
private Date dataChangeLastModifiedTime;

@PrePersist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class ServerConfig extends BaseEntity {
@Column(name = "`Value`", nullable = false)
private String value;

@Column(name = "Comment", nullable = false)
@Column(name = "`Comment`", nullable = false)
private String comment;

public String getKey() {
Expand Down
Loading