SHIELD - Table name |
Perhaps Shield table name has been used for other project.
Suggestion: Make the table name customizable like CodeIgniter Settings or Ion Auth
Hi, can you explain why two Auth packages should be used simultaneously on the same site?
Let's say some workplaces have policies and procedures for table names to follow a standard like ISO
(08-02-2022, 06:10 PM)datamweb Wrote: Hi, can you explain why two Auth packages should be used simultaneously on the same site? My suggestion Create constant for auth tables in Config/Auth.php. For example tbl_auth PHP Code: ... And use it within the file project. Ie migration PHP Code: .. Models PHP Code: ..
I agree with @nfaiz, a better approach would be a configurable option before running setup.
Not just for teamwork but you also might be using the same name(s) that can cause conflicts. I think writing this in the Auth config would be a good place, as it contains the view override as well. PHP Code: /**
Now you will have problems with the Database Migrations.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Yes, if you add the table property, the database migration also needs to use the values.
And of course, if you change the property after initial setup, you also need to change the table names by yourself. (01-07-2023, 01:32 AM)kenjis Wrote: Yes, if you add the table property, the database migration also needs to use the values. How about change the workflow. To run migrations after constants/properties in Auth.php config has been set (if needed). (02-12-2023, 11:52 PM)kenjis Wrote: See https://github.com/codeigniter4/shield/pull/633 Thank you @kenjis and @datamweb. Really appreciate it. |
Welcome Guest, Not a member yet? Register Sign In |