kin-labs / kinetic

MIT License
40 stars 24 forks source link

refactor: merge referenceId and referenceType into single reference field #562

Closed beeman closed 1 year ago

beeman commented 1 year ago

This PR fixes a quirk that's been in Kinetic for a long time, which was splitting up the references into referenceId and referenceType.

While it's a common practice to link unknown external using a type and id field, in reality it's easy enough for a developer to decide on a separator and handle this themselves.

Having the single field makes for less parameters, and it will make the logic / constraints in #560 easier to implement.

After going back and forth quite a few times, we finally decided to merge the 2 fields into one field.

This PR adds a migration option that merges the data any data from referenceId and referenceType into the new single reference field, separated with a |.

nx-cloud[bot] commented 1 year ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a3cbcdf3f3a9da8fbf5dbdef4507b359c26b7de8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 6 targets - [`nx affected --target=build --parallel --max-parallel=3`](https://cloud.nx.app/runs/SuqskgqV18) - [`nx affected --target=lint --parallel --max-parallel=3`](https://cloud.nx.app/runs/dKy6Xx4goZ) - [`nx affected --target=test --parallel --max-parallel=3`](https://cloud.nx.app/runs/8IpdgFXx5Q) - [`nx e2e api-e2e --skip-nx-cache`](https://cloud.nx.app/runs/yWpdt0itSl) - [`nx e2e sdk-e2e --skip-nx-cache`](https://cloud.nx.app/runs/AFDkTLwdae) - [`nx e2e web-e2e --skip-nx-cache`](https://cloud.nx.app/runs/eRJFqdqltJ)

Sent with 💌 from NxCloud.