Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
474 views
in Plugins by

I know I can create a table from a qa_register_plugin_module using: 

function init_queries($tableslc) {
   return 'CREATE TABLE ^mytable (....

Now I have written a plugin that has only a qa_register_plugin_layer.

Do I need to register a plugin-module only for creating the database table or can I create the table from the layer as well? In other words, can I use init_queries for the layer? ... my feeling says no, I have to use a plugin-module, am I right?

1 Answer

0 votes
by
selected by
 
Best answer
Yes you need a module type plugin. But that's how it should be, because you shouldn't be writing to the database from the layer anyway so you should have a plugin module that's updating stuff there. The layer is only for display.
...