2021-03-14, 12:25 AM
(This post was last modified: 2021-03-14, 03:14 PM by dragonexpert.)
(2021-03-13, 04:16 AM)Laird Wrote:(2021-03-13, 02:34 AM)dragonexpert Wrote: We are considering refactoring the database tables to be stored in an array outside of the install function so other developers can easily get that data.
A sort of side note related to the above: I would really love to see this sort of abstraction layer for database table specification added to core. It would make support for different DB implementations (MySQL/MariaDB/PostgreSQL/SQLite) that much easier - the abstract spec would say, for example, "I want an auto-incrementing, non-nullable integer column ", and then each database class would decide how best to implement that abstract specification in its own SQL variant.
I have the SQL now completely refactored. I have the function for MySQLi working to generate proper create table statements. I have not actually implemented the function in the plugin yet because I'm still testing the function. SQLite and PGSql are not currently implemented in the function. I think if I reference the installation files of MyBB to see table structure I could probably figure it out.
I did some display edits, mostly on showgroup.php to make it more consistent.