dosubot[bot] commented on issue #8463:
URL: 
https://github.com/apache/incubator-devlake/issues/8463#issuecomment-2949030704

   <!-- Greeting -->
   Hi @fbgirardsherweb! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping 
the incubator-devlake team.
   
   <!-- Answer -->
   The migration error is happening because DevLake's migration scripts use the 
MySQL-specific MODIFY keyword, which PostgreSQL doesn't support. In PostgreSQL, 
you need to use ALTER TABLE ... ALTER COLUMN ... TYPE ... instead. For example, 
instead of:
   
   ```sql
   ALTER TABLE my_table MODIFY my_column VARCHAR(255);
   ```
   use:
   ```sql
   ALTER TABLE my_table ALTER COLUMN my_column TYPE VARCHAR(255);
   ```
   This pattern applies to all column type changes and is already handled in 
some parts of the codebase, but not everywhere—so migrations that don't check 
the DB dialect will fail on Postgres. See examples and implementation details 
in the codebase 
[here](https://github.com/apache/incubator-devlake/blob/41c047d2b54cefb9c4e86a19c2d738d0ab3ccbcf/backend/impls/dalgorm/dalgorm.go)
 and 
[here](https://github.com/apache/incubator-devlake/blob/41c047d2b54cefb9c4e86a19c2d738d0ab3ccbcf/backend/python/plugins/azuredevops/azuredevops/migrations.py).
   
   Currently, the official deployment files and Helm charts are MySQL-centric 
and not present in the main repo, so PostgreSQL support requires manual changes 
to DB_URL and environment variables in your deployment manifests. There are 
also known issues with the predefined Grafana dashboards—they are 
MySQL-specific and may not work out of the box with PostgreSQL 
[discussion](https://github.com/apache/incubator-devlake/issues/8350).
   
   If you want to proceed, you’ll need to patch the migration scripts to add 
PostgreSQL branches where needed, and update your deployment configs to use the 
correct Postgres connection string. If you hit more migration errors, look for 
other MySQL-specific SQL and swap in the Postgres equivalent.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8463)


-- 
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: dev-unsubscr...@devlake.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to