结构迁移有报错么?现在到哪一步报错了 任务创建的勾选 截图看看
上面那个报错的可以了
这个表结构迁移的时候报错了 是不是版本不支持,下面这个文字是 报错的表
(conn=1538326688) You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'ARRAY comment ‘题目分类(题目分类表ID)’,
question_level_id
VARCHAR(50’ at line 22 Query: – [INFO] [CONVERT] id
CHARACTER VARYING → VARCHAR(36)
– [INFO] [CONVERT] examination_paper_id
CHARACTER VARYING → VARCHAR(50)
– [INFO] [CONVERT] examination_paper_questions_type_id
CHARACTER VARYING → VARCHAR(50)
– [INFO] [CONVERT] question_id
CHARACTER VARYING → VARCHAR(50)
– [INFO] [CONVERT] question_level_id
CHARACTER VARYING → VARCHAR(50)
– [INFO] [CONVERT] question_type
CHARACTER VARYING → VARCHAR(20)
– [INFO] [CONVERT] difficult
CHARACTER VARYING → VARCHAR(20)
– [INFO] [CONVERT] question_content
TEXT → LONGTEXT
– [INFO] [CONVERT] explanation
TEXT → LONGTEXT
– [INFO] [CONVERT] answer_order
CHARACTER VARYING → VARCHAR(20)
– [INFO] [CONVERT] deleted
BOOLEAN → TINYINT(1)
– [INFO] [CONVERT] created_by
CHARACTER VARYING → VARCHAR(36)
– [INFO] [CONVERT] created_date
TIMESTAMP WITHOUT TIME ZONE → DATETIME
– [INFO] [CONVERT] last_modified_by
CHARACTER VARYING → VARCHAR(36)
– [INFO] [CONVERT] last_modified_date
TIMESTAMP WITHOUT TIME ZONE → DATETIME
create table t_examination_paper_question
(
id
VARCHAR(36) not null default ‘uuid_generate_v4()’ comment ‘ID’,
examination_paper_id
VARCHAR(50) comment ‘试卷ID(试卷表ID)’,
examination_paper_questions_type_id
VARCHAR(50) comment ‘试卷题目组成表ID’,
sort
INTEGER comment ‘排序’,
question_id
VARCHAR(50) comment ‘题目ID(题目表ID)’,
question_classification_id
ARRAY comment ‘题目分类(题目分类表ID)’,
question_level_id
VARCHAR(50) comment ‘题目等级(题目等级表ID)’,
question_type
VARCHAR(20) comment ‘题目类型(枚举)’,
difficult
VARCHAR(20) comment ‘题目难易度(枚举)’,
question_content
LONGTEXT comment ‘题目内容’,
explanation
LONGTEXT comment ‘答案说明’,
answer_order
VARCHAR(20) comment ‘答案顺序差异(枚举)(填空题使用)’,
answer_keyword
ARRAY comment ‘答案关键字(问答题使用)’,
deleted
TINYINT(1) not null default ‘0’ comment ‘软删除’,
created_by
VARCHAR(36) not null comment ‘创建人’,
created_date
DATETIME not null default CURRENT_TIMESTAMP comment ‘创建时间戳’,
last_modified_by
VARCHAR(36) comment ‘最后更新人’,
last_modified_date
DATETIME comment ‘最后更新时间戳’,
constraint pk_t_examination_paper_question
primary key (id
)
) Parameters: []
z这个语句哪里有问题 不理解
create table
t_examination_paper_question
(id
VARCHAR(36) not null default ‘uuid_generate_v4()’ comment ‘ID’,examination_paper_id
VARCHAR(50) comment ‘试卷ID(试卷表ID)’,examination_paper_questions_type_id
VARCHAR(50) comment ‘试卷题目组成表ID’,sort
INTEGER comment ‘排序’,question_id
VARCHAR(50) comment ‘题目ID(题目表ID)’,question_classification_id
comment ‘题目分类(题目分类表ID)’,question_level_id
VARCHAR(50) comment ‘题目等级(题目等级表ID)’,question_type
VARCHAR(20) comment ‘题目类型(枚举)’,difficult
VARCHAR(20) comment ‘题目难易度(枚举)’,question_content
LONGTEXT comment ‘题目内容’,explanation
LONGTEXT comment ‘答案说明’,answer_order
VARCHAR(20) comment ‘答案顺序差异(枚举)(填空题使用)’,answer_keyword
ARRAY comment ‘答案关键字(问答题使用)’,deleted
TINYINT(1) not null default ‘0’ comment ‘软删除’,created_by
VARCHAR(36) not null comment ‘创建人’,created_date
DATETIME not null default CURRENT_TIMESTAMP comment ‘创建时间戳’,last_modified_by
VARCHAR(36) comment ‘最后更新人’,last_modified_date
DATETIME comment ‘最后更新时间戳’,constraint
pk_t_examination_paper_question
primary key (id
))
没有类型 看着语法错误
create table t_product_apply
(
id
VARCHAR(36) not null default ‘uuid_generate_v4()’ comment ‘主键’,
apply_type
VARCHAR(30) not null comment '报名类别
PRODUCT_EXHIBITION 文创产品展示
AWARDS_EXHIBITION 获奖作品展示
PRODUCT_RECOMMEND 文创产品推荐’,
product_name
VARCHAR(30) not null comment ‘产品名称’,
photo
LONGTEXT not null comment ‘产品外观图册’,
product_type
VARCHAR(30) not null comment ‘产品类型(枚举)’,
product_material
VARCHAR(300) not null comment ‘产品材质(枚举)’,
length
INTEGER comment ‘长’,
width
INTEGER comment ‘宽’,
height
INTEGER comment ‘高’,
yieldly_province_code
VARCHAR(30) comment ‘生产地省(编码)’,
yieldly_province_name
VARCHAR(30) comment ‘生产地省(名称)’,
yieldly_city_code
VARCHAR(30) comment ‘生产地市(编码)’,
yieldly_city_name
VARCHAR(30) comment ‘生产地市(名称)’,
manufacturer
VARCHAR(30) comment ‘制造商’,
video
LONGTEXT comment ‘视频’,
product_presentation
LONGTEXT not null comment ‘产品介绍’,
author
VARCHAR(30) comment ‘姓名’,
linkman
VARCHAR(11) comment ‘手机号’,
id_card
VARCHAR(30) comment ‘身份证号码’,
author_province_code
VARCHAR(30) comment ‘创作者省(编码)’,
author_province_name
VARCHAR(30) comment ‘创作者省(名称)’,
author_city_code
VARCHAR(30) comment ‘创作者市(编码)’,
author_city_name
VARCHAR(30) comment ‘创作者市(名称)’,
author_area_code
VARCHAR(30) comment ‘创作者区/县(编码)’,
author_area_name
VARCHAR(30) comment ‘创作者区/县(名称)’,
address
VARCHAR(30) comment ‘详细地址’,
winning_competitions_name
VARCHAR(30) comment ‘获奖比赛名称’,
winning_time
DATE default CURRENT_TIMESTAMP comment ‘获奖时间’,
deleted
TINYINT(1) not null default ‘0’ comment ‘软删除’,
created_by
VARCHAR(36) not null comment ‘创建人’,
created_date
DATETIME(6) not null default CURRENT_TIMESTAMP(6) comment ‘创建时间戳’,
last_modified_by
VARCHAR(36) comment ‘最后更新人’,
last_modified_date
DATETIME(6) comment ‘最后更新时间’,
status
VARCHAR(30) comment ‘发布状态’,
click_qty
INTEGER default ‘0’ comment ‘总阅读量/点击量’,
publish_date
DATETIME(6) comment ‘发布时间’,
grade
VARCHAR(50) comment ‘产品等级’,
accessory
VARCHAR(255) comment ‘附件’,
accessory_name
VARCHAR(255) comment ‘附件名称’,
constraint pk_t_product_apply
primary key (id
)
)
comment=‘文创产品报名表’;
z这个类型是为什么不错 有没有平替的数据类型
CREATE TABLE t_timestamp(C1 date not null default current_timestamp); 这样的语法有问题,date类型可以换成datetime或者timestamp