2
Is it possible to program the database to have a default record if there is no other record in the table? making the table impossible to be empty.
then if there are other records it ignores the default if it has none it uses the default.
it is possible?
I am implementing access permissions on a system that already has many users and most users do not have registered permission so it causes problems when checking permissions and so on.. then I would like to mount a record that always existed by default configuration.
It would probably be the case to do this in the application. IF has record in db, $permissions = db field, Else $permissions = default user. The advantage of this is that if there are several different permissions, you only write different permissions to each user.
– Bacco
Yes. the biggest problem is that these permissions are tied to different plans so I must have basic plans and permissions registered @Bacco
– Silvio Andorinha
@Silvioandorinha I think that the best option is to try to correct the method that validates the permissions, I think a lot of ways to create a default record in the bank.
– Pablo Tondolo de Vargas