我有一个小的MySQL语句(实际上是两个)来创建一个表:
# --- !Ups
create table `user` (
`id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`first_name` TEXT NOT NULL,
`last_name` TEXT NOT NULL,
`mobile` BIGINT NOT NULL,
`email` TEXT NOT NULL
)
# --- !Downs
drop table `user`
我想将两者转换为H2语法。我以前从未接触过H2,the documentation不是很干净
我假设drop查询是:
DROP TABLE USER
正确?怎么样的创建查询?
答案 0 :(得分:0)
使用Intellij找到解决方案:
# --- !Ups
CREATE TABLE PUBLIC.USER
(
ID BIGINT AUTO_INCREMENT PRIMARY KEY NOT NULL,
FIRST TEXT NOT NULL,
LAST TEXT NOT NULL,
MOBILE BIGINT NOT NULL,
EMAIL TEXT NOT NULL
);
# --- !Downs
DROP TABLE PUBLIC.USER