[allnet] Fix Keychip sql migration on MariaDB/MySQL

This commit is contained in:
Dom Eori
2023-04-25 17:26:46 +09:00
parent 38be1903f6
commit 046f65805d
3 changed files with 25 additions and 27 deletions

View File

@@ -1,23 +1,27 @@
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")
@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
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@Column(name = "id", nullable = false)
private Long id;
private long id;
private String keychip_id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

View File

@@ -1,8 +1,5 @@
create table allnet_keychips
CREATE TABLE allnet_keychips
(
id int(20) primary key AUTOINCREMENT not null,
keychip_id varchar(255) not null
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
collate = utf8mb4_unicode_ci;
id BIGINT auto_increment PRIMARY KEY,
keychip_id VARCHAR(255) NOT NULL
);

View File

@@ -1,8 +1,5 @@
create table allnet_keychips
CREATE TABLE allnet_keychips
(
id int(20) primary key AUTOINCREMENT not null,
keychip_id varchar(255) not null
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
collate = utf8mb4_unicode_ci;
id BIGINT auto_increment PRIMARY KEY,
keychip_id VARCHAR(255) NOT NULL
);