dokufreaks / plugin-blogtng

http://dokuwiki.org/plugin:blogtng
GNU General Public License v2.0
36 stars 18 forks source link

Use sqlite helper plugin #110

Closed Klap-in closed 11 years ago

Klap-in commented 11 years ago

All the sqlite database actions are rewritten to sqlite helper plugin.

The sqlite code of blogtng was almost similar to the sqlite helper plugin. All the differences are from improvements in the sqlite helper plugin.

I think there is no upgrade mechanism required. I reused almost all the sql database setup files. (only removed a bit that is default included in the sqlite helper plugin)

I have only tested this on an wiki that hasn't been a blog before. Also i have no experience with the blogtng. So i didn't test the syntax so far.

Please share the issues, then i can help fix them :)

hArpanet commented 11 years ago

My concern with this branch is that it makes too-big a jump away from existing code.

Rather than offering an additional feature it forces anyone wishing to use BlogTNG to also install the sqlite-helper-plugin.

Would it not be better, and smoother, for us to first introduce the use of the sqlite-helper-plugin as an additional option under 'plugin blogtng sqlite version' in the Configuration Manager settings for BlogTNG?

I only have a small amount of blog entries on my site, but I'd certainly be more confident in updating if I was just being given an extra option to test rather than being forced to change, especially until it has been fully tested in the wild. Maybe others are happier to just make the leap?

Klap-in commented 11 years ago

Technical the sqlite2 code of the blogtng was a similar to the code of the sqlite plugin of about two years ago. In the mean time the sqlite plugin is extended with sqlite3 support and improved.

Of course it is needed to test this branch before we will merge it into the master branch. Therefore i created a separate branch. Parts that are almost not tested, are the <blog...> syntaxes. Because i have at the moment at my test environment no sqlite2 php extension available, i cannot test the upgrade function of the sqlite plugin with data of the BlogTNG. So i hope others can test this.. I expect that it works fine, but we know only sure when it is tested.

The only struggle for users who update BlogTNG is indeed that they need to install a new plugin. i think the error message explains clear enough which actions the user needs to perform.

The data plugin is a plugin that is also often used, and there people don't complain about the separate sqlite plugin. So i think that users of BlogTNG will understand it too.

Give this some clearification about this new branch?

hArpanet commented 11 years ago

Should we be defining some milestones here and assigning various elements as appropriate?

Do we have anyone that can officiate any milestones or update paths for this plugin?

Klap-in commented 11 years ago

User tests to be performed at least are:

a. User has only BlogTNG(usesqlitehelperplugin version) installed and not yet sqlite plugin.

In next cases the user has installed sqlite plugin.

b. User has only php sqlite2 extension installed:

  1. user has clean installation.
    • The database should be created and he can start using the blogTNG.
  2. user has already a database ( [dokuwiki]/data/meta/blogtng.sqlite).
    • The blogTNG should pick it up and recognize it as before.
    • every function should work

c. User has php sqlite2 and pdo sqlite3 extensions installed:

  1. user has clean installation
    • a sqlite3 database is created and used ( [dokuwiki]/data/meta/blogtng.sqlite3)
  2. user has already a sqlite2 database (in [dokuwiki]/data/meta/blogtng.sqlite)
    • old sqlite2 database is recognized and the user get message that he should go to the Admin > Sqlite interface for performing an upgrade to sqlite3
    • in the interface he can select database and start the upgrade. This creates [dokuwiki]/data/meta/blogtng.sqlite3

d. User has only php's sqlite3 pdo installed.

  1. user has clean installation
    • a sqlite3 database is created and used ( [dokuwiki]/data/meta/blogtng.sqlite3)
  2. user has already a sqlite2 database (in [dokuwiki]/data/meta/blogtng.sqlite)
    • old sqlite2 database is recognized and the user get message that he should go to the Admin > Sqlite interface for performing an upgrade to sqlite3
    • the interface shows instruction howto manually the database can be upgraded
    • after upgrade the sqlite database should be: [dokuwiki]/data/meta/blogtng.sqlite3
Klap-in commented 11 years ago

i have tested: a and d.1

Klap-in commented 11 years ago

I have got an installation with sqlite2 (and sqlite3 and set the $this->existsPDOSqlite() too false so it skip at initialization)

So b.1, c.2 (by Michitux too) and d.2. That is a nice coverage.