aimhubio / aim

Aim 💫 — An easy-to-use & supercharged open-source experiment tracker.
https://aimstack.io
Apache License 2.0
4.94k stars 299 forks source link

SQLAlchemy support for MySQL #3072

Open sharathmk9 opened 6 months ago

sharathmk9 commented 6 months ago

🚀 Feature

Currently Aim structures storage should be sqlite, but for production deployment we need a more stable database like MySQL or Postgresql etc. As Aim already uses SQLAlchemy we tried to configure for MySQL, but some of the column type with unique constraint is not supported.

The major was with name and hash uses Text column type with UniqueConstraint, but MySQL doesn't support unique constraint on Text column type. Is it possible to change from Text to Varchar.

sa.Column('uuid', sa.VARCHAR(512), nullable=True),
sa.Column('name', sa.VARCHAR(512), nullable=False),

Above changes are required is many tables. It was very changes for us as we were starting from scratch, but I'm not sure how to change column type part of migration so we can move our changes to upstream.

Looking forward to discuss the options..

Motivation

Pitch

Alternatives

Additional context