SQLite problems #9
Comments
That's strange. To help diagnose the problem, can you tell us what other plugins do you use in combination with strata? (And the version of sqlite you're using? As far as I know it shouldn't matter how the file is called...) |
sqlite plugin version 2015-05-04 (just upgraded)
On the command line I can look inside the strata.sqlite3 database and the problem seems to be that there is not table 'opts' For a comparison, I also installed the data plugin, and there is a table called 'opts'. So for some reason my strata.sqlite3 doesn't have the 'opts' table with the 'dbversion' entry, this seems to be expected by the sqlite-plugin. Searching through the strata-plugin code I can find no reference to a dbversion. The sqlite-plugin init() code failed to create the 'opts' table. On the command line I manually added the table and inserted a value of dbversion=1 and this stops the error on the SQLite Access page:
|
Ok, I did some investigating to get to the bottom of this. As it turns out, the sqlite plugin assumes control of all files called There two good solutions to resolve the problem:
Since it appears that none of your other plugins depend on the sqlite plugin, I suggest going with the first option, and simply uninstall the sqlite plugin since it is not necessary. If there's a reason to keep it around, the second options will Let me know how it works out, or if you need any help! (Note: The strata plugin uses only the file it is configured for, so if the sqlite plugin renames that to |
Thanks for looking into this. I assumed that strata-plugin required the sqlite-plugin. I quite like the ability to run SQL queries from within dokuwiki using the sqlite-plugin, so actually I'll keep them together, so I'm going to skip your (1) and (2) suggestions and stick with my hack/fix of manually creating the 'opts' table inside strata.sqlite3. P.S. Really love the strata-plugin, it's really great. Could do with a slightly longer tutorial/guide/examples, but thanks for all your work. |
Note that unless you change the configuration, strata will continue using If this is left like that, updated data from new or changed pages is not going to be present in the |
What is the default database file that the Strata Plugin will create? |
Ideally, a neater solution would be to have some mechanism in the sqlite plugin that other plugins use to register their database for management. It's a bit strange how the sqlite plugin simply assumes control over all files called The second best would be to adapt the strata plugin to use a different file name. Unfortunately, this would force all current users of strata to change their configuration, or to manually move the file around... I feel that simply moving the file I am not sure how to tackle this, and will probably have to look at the sqlite plugin some more to see if there's a clean way to handle this conflict. Ideas would be greatly appreciated! |
So the default database file name for a sqlite strata database is (I did some development on the sqlite plugin. So just ask your questions.) |
This two checks are performed at the selected
|
Yes, the default name is I do not really want to inconvenience the sqlite plugin, yet I would also like for the two plugins to peacefully co-exist. What are the minimal necessities that I would need to change on my side to cooperate with the sqlite plugin without actually depending on it? As far as I gather right now, it is the existence of an For now, I'll have a think on how to tackle this incompatibility. |
Check if the selected database is sqlite3 is by: https://github.com/cosmocode/sqlite/blob/master/classes/adapter.php#L83 For these indeed a And the opts table is used for storing the database version. for example the Do Plugin database looks like: query:
query:
I rise now an issue at the sqlite tracker for discussion this.
I tend to the latest option, but with a warning that it is not fitting to the default sqlite-plugin scheme. |
Maybe auto-update mechanisms can still trigger some nifty things, if you just add an |
Running Dokuwiki: Release 2014-09-29d "Hrun"
Strata plugin 'master' branch
Running the strata plugin with the latest sqlite it requested to change the filename from .sqlite to .sqlite3, to use version 3.
However, from the Admin-sqlite interface I get errors when trying to look inside the strata database.
Specifically:
HY000 1 no such table: opts:
SELECT val FROM opts WHERE opt = 'dbversion'
SQLite: no DB version found. 'strata' DB probably broken.
The text was updated successfully, but these errors were encountered: