Reputation: 179
I am working on a plugin that handles logs, as such it needs its own database table. However doing the typical manifest does not seem to work and is causing errors. Not sure where I may be going wrong as searching this issue has yielded no results.
<install>
<sql>
<file driver="mysql" charset="utf8">sql/mysql/install.mysql.utf8.sql</file>
</sql>
</install>
I tested the SQL in phpmyadmin and it works fine. All it needs to do is create a simple table with 4 columns.
Upvotes: 0
Views: 2083
Reputation: 5615
I'm not sure it makes sense to do it: if you create a table, you need to provide some management features, at least view and delete / empty, so you typically would want to write a component for that. You could then build a package and distribute them in one file.
If you really want to try, another option could be to create the table in a postflight event, you can write a function to be invoked after installation (typically used to enable the plugin) and create the table there.
Upvotes: 1