v1.3.11: users_groups
, groups
, and permission
tables are orphans
#163
Labels
users_groups
, groups
, and permission
tables are orphans
#163
Thanks for maintaining laravel-authentication-acl 👍
N.B. I haven't checked whether this affects later versions of laravel-authentication-acl.
In v1.3.11, laravel-authentication-acl seems to make migrations that create the following tables (among others) and leave them as orphans:
users_groups
table;groups
table; andpermission
table.The fact that these tables, in particular, are orphans, seems to be a bug. Why?
Because the
users_groups.user_id
column seems intended to draw its contents exclusively from theusers.id
column's contents. (So, ideally the migrations would declare a foreign-key relationship between the two.)Similarly, the
users_groups.group_id
column seems intended to draw its contents exclusively from thegroups.id
column's contents. (So, ideally the migrations would declare a foreign-key relationship between the two.)Also, there seems to be an implicit many-to-many relationship between the
groups.permissions
column and the entries in thepermission
table. Currently, laravel-authentication-acl appears to handle this by having the former contain text strings that are PHP arrays (I think) made by concatenating entries frompermission.permission
with surrounding boilerplate. This seems needlessly fragile and un-RDBMS-like. (Ideally, the migrations would instead create agroups_permission
table, and declare foreign-key relationships betweengroups.id
andgroups_permission.group_id
and betweengroups_permission.permission_id
andpermission.id
.)The text was updated successfully, but these errors were encountered: