jsdelivr / dash-directus

The jsDelivr dashboard backend
Open Software License 3.0
1 stars 0 forks source link

Adopted probes migration broken #22

Closed MartinKolarik closed 4 months ago

MartinKolarik commented 4 months ago

I ran into a couple of issues while deploying https://github.com/jsdelivr/dashboard/pull/21, most notably the columns in the old and new probe tables ended up in an entirely different order, which broke the INSERT INTO gp_adopted_probes SELECT * FROM adopted_probes Let's check what that happened and fix it in case we ever need to run this again. Also, check the other collections being migrated.

Since we're not live yet, I've just dropped all existing probes right now.

alexey-yarmosh commented 4 months ago

By default columns are ordered alphabetically, but new columns are added to the end. Since new columns were added multiple times to the adopted_probes table order was different from the newly created gp_adopted_probes. I updated the migration.