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

Issue with creating job_histories table due to duplicate column name. #6

Open
mmanda-extr opened this issue Sep 4, 2023 · 0 comments

Comments

@mmanda-extr
Copy link

Hello @deepaksinghvi,
There is an issue with creation of job_histories table during initial bringup.

Both JobHistory struct and its embedded Model struct have a field named Deleted at and this is causing table creation error with duplicate column names with the following error:

During compilation of cdule/pkg/model/setup.go:117 Error 1060: Duplicate column name 'deleted_at'
[57.116ms] [rows:0] CREATE TABLE job_histories (id bigint AUTO_INCREMENT,created_at datetime(3) NULL,updated_at datetime(3) NULL,deleted_at datetime(3) NULL,job_id bigint,execution_id bigint,status longtext,worker_id longtext,retry_count bigint,PRIMARY KEY (id),INDEX idx_job_histories_deleted_at (deleted_at,deleted_at))

I see that DeletedAt in Model structure is not used. Either this can be commented out or a different column name using the following gorm attribute can be added:

DeletedAt gorm.DeletedAt gorm:"column:model_deleted_at; index"

Please let me know what you think.

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

No branches or pull requests

1 participant