JFGHT commented on issue #8497: URL: https://github.com/apache/incubator-devlake/issues/8497#issuecomment-3744709648
> [@klesh](https://github.com/klesh) > > Workaround that unblocked me - I added the column to _tool_circleci_jobs and _tool_circleci_workflows tables and syncronized it with created_at field. Not sure whether it won't break anything in the future, but so far it works > > ``` > ALTER TABLE _tool_circleci_jobs > ADD COLUMN created_date DATETIME(3) > GENERATED ALWAYS AS (created_at) STORED; > CREATE INDEX idx_circleci_jobs_created_date ON _tool_circleci_jobs (created_date); > ``` This did not work on my end. What worked was: ```sql ALTER TABLE _tool_circleci_pipelines DROP COLUMN IF EXISTS created_date; ALTER TABLE _tool_circleci_pipelines ADD COLUMN created_date DATETIME(3) DEFAULT NULL; ALTER TABLE _tool_circleci_jobs DROP COLUMN IF EXISTS created_date; ALTER TABLE _tool_circleci_jobs ADD COLUMN created_date DATETIME(3) DEFAULT NULL; ALTER TABLE _tool_circleci_workflows DROP COLUMN IF EXISTS created_date; ALTER TABLE _tool_circleci_workflows ADD COLUMN created_date DATETIME(3) DEFAULT NULL; DELIMITER // DROP TRIGGER IF EXISTS tr_circleci_pipelines_sync// CREATE TRIGGER tr_circleci_pipelines_sync BEFORE INSERT ON _tool_circleci_pipelines FOR EACH ROW BEGIN IF NEW.created_at IS NOT NULL THEN SET NEW.created_date = NEW.created_at; END IF; END// DROP TRIGGER IF EXISTS tr_circleci_jobs_sync// CREATE TRIGGER tr_circleci_jobs_sync BEFORE INSERT ON _tool_circleci_jobs FOR EACH ROW BEGIN IF NEW.created_at IS NOT NULL THEN SET NEW.created_date = NEW.created_at; END IF; END// DROP TRIGGER IF EXISTS tr_circleci_workflows_sync// CREATE TRIGGER tr_circleci_workflows_sync BEFORE INSERT ON _tool_circleci_workflows FOR EACH ROW BEGIN IF NEW.created_at IS NOT NULL THEN SET NEW.created_date = NEW.created_at; END IF; END// DELIMITER ; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
