https://dagster.io/ logo
#ask-community
Title
# ask-community
j

JCA User

02/17/2023, 8:50 PM
Hello -- I am trying to migrate my storage to mysql. One issue I have is that my mysql instance requires a primary key to be defined at the time of creating every table but the sql statement it's running to create table
daemon_heartbeats
does not have a primary key (despite it having a unique column. Is there any way to tweak the storage config in
dagster.yaml
to resolve this?
I looked into this more and it seems like the issue is that a primary key is not specified in some of the metadata tables. Mainly:
daemon_heartbeats
and
instance_info
tables in
dagster._core.storage.runs.schema
The recommended settings for a mysql implementation is for every table to have a primary key. Even if it is an auto increment identity column. I think this would be an incremental benefit to the library. Thoughts?
happy to create an issue if you prefer
c

claire

02/21/2023, 6:28 PM
Hi @JCA User, thanks for reporting this. Would you mind creating an issue for this? I suspect that some instances of mysql have this constraint (the ones in our test suite do not). We likely should update our tables to have these primary keys and include the mysql type with this constraint in our test suite
j

JCA User

02/21/2023, 7:17 PM
10 Views