Skip to content

v5.4.0 Schema UUID added, uniqueness check improved

Compare
Choose a tag to compare
@tot-ra tot-ra released this 27 Oct 13:50
· 18 commits to master since this release
75ed3c0
  • Add schema normalization (re-formatting) - this should get rid of extra tabbing & spacing when services register their schemas inconsistently
  • Fix knex migration generation from commandline (npm run new-db-migration my-new-migration)
  • Improve migration scripts to support JS migrations. Possibly somewhat breaking change for organizations that relied only on .sql files
  • Migrate schemas to now include UUID (js migration). If your organization didn't expect/run js migrations, you will have empty UUIDs, but follow-up schema registrations should have it in new schemas, so not a big deal, just may be a bit confusing in the UI
  • We do not delete duplicate schemas her, as its a bit dangerous. You may have had duplicate schemas before, if you need to clean them up, here is a script:
UPDATE `container_schema` t3
  INNER JOIN `schema` t1
  INNER JOIN `schema` t2
  SET t3.schema_id = t1.id
  WHERE t1.UUID IS NOT null
    AND t1.id < t2.id
    AND t1.UUID = t2.UUID
    AND t3.schema_id = t2.id;

DELETE t2
  FROM `schema` t1
  INNER JOIN `schema` t2
  WHERE
    t2.UUID IS NOT null AND
    t1.id < t2.id AND
    t1.UUID = t2.UUID;

Use with caution