启动 SpringBoot Khyber 时不会验证 Postgre 中的列:
phone CHAR(10) UNIQUE NOT NULL
尽管实体设置为:
@Column(unique=true, nullable = false, name="phone", length=10, columnDefinition = "char")
private String phone;
你还能在这里尝试什么?
错误:
Schema-validation: wrong column type encountered in column [phone] in table [bankdemo.accounts]; found [bpchar (Types#CHAR)], but expecting [varchar(10) (Types#VARCHAR)]
1 个回答