mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 18:58:55 +08:00
[allnet] Fix Keychip sql migration on MariaDB/MySQL
This commit is contained in:
@@ -1,23 +1,27 @@
|
|||||||
package icu.samnyan.aqua.sega.allnet.model;
|
package icu.samnyan.aqua.sega.allnet.model;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.UniqueConstraint;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@Entity(name = "Keychip")
|
@Entity(name = "Keychip")
|
||||||
@Table(name = "allnet_keychips", uniqueConstraints = {@UniqueConstraint(columnNames = {"keychip_id"})})
|
@Table(name = "allnet_keychips", uniqueConstraints = {@UniqueConstraint(columnNames = {"keychip_id"})})
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class Keychip implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public class Keychip {
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.SEQUENCE)
|
private long id;
|
||||||
@Column(name = "id", nullable = false)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
private String keychip_id;
|
private String keychip_id;
|
||||||
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
create table allnet_keychips
|
CREATE TABLE allnet_keychips
|
||||||
(
|
(
|
||||||
id int(20) primary key AUTOINCREMENT not null,
|
id BIGINT auto_increment PRIMARY KEY,
|
||||||
keychip_id varchar(255) not null
|
keychip_id VARCHAR(255) NOT NULL
|
||||||
)
|
);
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8mb4
|
|
||||||
collate = utf8mb4_unicode_ci;
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
create table allnet_keychips
|
CREATE TABLE allnet_keychips
|
||||||
(
|
(
|
||||||
id int(20) primary key AUTOINCREMENT not null,
|
id BIGINT auto_increment PRIMARY KEY,
|
||||||
keychip_id varchar(255) not null
|
keychip_id VARCHAR(255) NOT NULL
|
||||||
)
|
);
|
||||||
ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8mb4
|
|
||||||
collate = utf8mb4_unicode_ci;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user