Remove all advisor stuff and fix migrations #25
Reference in New Issue
Block a user
Delete Branch "remove-advisor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses #21
The notifications preferences UI will likely need an update (or total removal) later since the only thing left after removing the advisor notifications is a ConverKit function or 2. Will revisit once we get auth sorted and can log in and really test the UI.
I also tried to clean up some unused imports throughout files I touched, hence some of the deletions there.
This change also uses introspection to populate the dbgenerated parameters for columns that are a custom type (non native data type). There's a known issue in Prisma where dbgenerated() with nothing passed in will continue to generate migrations that are not compatible when it should noop. This should fix the migration hiccups discussed in the Discord.
I don't love having those big database functions in the schema.prisma file but seems to be the best workaround to get migrations working smoothly again. Might revisit later and refactor using triggers.
I also bumped prisma dependency to see if they had patched the issue, but no luck.
Lots of stuff going on here to remove all the advisor functionality so apologies for the massive PR.
Thanks @tmyracle! Definitely would prefer smaller PRs in the future, but fine at the moment given we're doing some major cleanup and trying to reduce the overall complexity of the app.
Have merged to main.