tractr / directus-sync

A CLI tool for synchronizing the schema and configuration of Directus across various environments.
GNU General Public License v3.0
211 stars 8 forks source link

Failed to migrate SQLite to MySql #41

Closed AndreiKolosov closed 5 months ago

AndreiKolosov commented 5 months ago

Hi! I have a Directus instance on SQLite3. When I try to migrate to a MySql instance with the --force flag, I get the following error. Both instances are version 10.9.3. image

EdouardDem commented 5 months ago

@AndreiKolosov The collection service does not allow to create a collection that start with directus_. In your case, this is the directus_sync_id_mapcollection. This collection is created by the directus-extension-sync. This extension should be install in your new Directus instance (the one with MySQL) before using the directus-sync CLI. Did you install this extension ?

AndreiKolosov commented 5 months ago

@EdouardDem Yes, I installed these dependencies in both projects. image

AndreiKolosov commented 5 months ago

@EdouardDem From the above, I understood that the directus_sync_id_map collection is created at the time of installing the additional extension. I decided to conduct an experiment. I dropped the database, reinstalled all the dependencies on the MySQl instance and pushed again. Everything worked out. Apparently, for some reason I did not have a collection that was essential for proper operation. Thanks for the help!