qcod / laravel-gamify

Gamify your Laravel app with Reputation Points & Achievements Badges support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UUID support?

czechbox opened this issue · comments

Was about to implement this, and reviewing the migrations, noticed that columns like reputations.subject_id, reputations.payee_id and user_badges.user_id make assumption about column types (e.g. these are integers or unsignedIntegers).

Was going to just edit the migration, but thought there might be some value in making this more introspective, as I'm sure I won't be the only person using UUIDs for some of these.

The first hurdle seems to be it's either/or not both so some structural change may be needed to extend this to mixed ID types. Perhaps a pivot table for this relationship might make more sense.

Next hurdle is these are in effect, foreign keys. Should we care about that and take advantage of things like cascading deletes?

Before I jump into all that, I thought it might be best to find out what your thoughts might be on these things. Happy to collaborate and submit PRs, but if it's not a direction you're interested in, let me know so I don't waste your time.