You might find that your library needs to make use of a database table. There are a few ways that you can go about including a database table, but which way is the best?
Personally, this is my preferred method of including a database table with my libraries.
I simply include a .sql
file, along with all of the MySQL queries needed to create all of the tables. This is the easiest method of including a way to create the tables for the library developer, although it's not so easy for the developer trying to use the library. It's not ideal, but it works well.
Another method would be to create an install file that connects to the database and creates all of the tables. The problem with this method is that it takes time to build and you don't know how far to go with it. Do you ask for the database details? Do you write over config/database.php
?
To be honest with you, I feel that an install file for a library would be total overkill...