Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add partition Error 1564 (HY000): This partition function is not allowed #7197

Open
wangsiqi2015 opened this issue Sep 19, 2024 · 1 comment
Assignees
Labels
type:question general questions

Comments

@wangsiqi2015
Copy link

Your Question

The document you expected this should be explained

Expected answer

@wangsiqi2015 wangsiqi2015 added the type:question general questions label Sep 19, 2024
@wangsiqi2015
Copy link
Author

wangsiqi2015 commented Sep 19, 2024

version:gorm.io/gorm v1.25.12,MySQL8.0.34

ddl:CREATE TABLE IF NOT EXISTS instance (
id bigint NOT NULL AUTO_INCREMENT,
name varchar(500) NOT NULL,
object_id varchar(100) NOT NULL,
custom json DEFAULT NULL,
extend_custom json DEFAULT ('{}'),
unique_value varchar(1000) default NULL,
creator varchar(100) DEFAULT NULL,
modifier varchar(100) DEFAULT NULL,
create_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
update_time timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (id,object_id)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
PARTITION BY LIST COLUMNS(object_id)
(PARTITION DefaultObject VALUES IN ('DefaultObject'));

sql:alter table instance ADD PARTITION (PARTITION yyy VALUES IN ('yyy') ENGINE = InnoDB);

comment:table is ready。this sql can execute on dbeaver,but cannot be execute by gorm:Error 1564 (HY000): This partition function is not allowed
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question general questions
Projects
None yet
Development

No branches or pull requests

2 participants