Currently import IDs are cleared during the last step of an import in order to prevent collisions during future imports. However, it is useful to maintain import IDs in case the same database is imported again at a later time, or if some of the import data is needed for smooth operation of some features (e.g. imported namespaces might behave differently, or we might optimize the node stack handler if a page is known to be not imported, and therefore definitely not triple-stacked.
Change names of the import fields from things like import_threadid or import_pageid, and put a consistently named importid on every table that might contain importable data during installation.
Create a separate table for storing import IDs relative to database identifiers:
Code:
vw_import
importid | INT | UNSIGNED | original source ID
table | STR | target table name
ident | STR | identifier that VaultWiki can use to uniquely identify different databases. It should not be possible to fully regenerate the database credentials from this identifier, but it should be possible to generate the same identifier whenever the same database is used.
The import system as it is currently written should already support CLI with minimal changes to the system. We just haven't written a CLI script to access it yet.
When I said it's a major rework I simply mean that it requires changes (only a few lines though) to most import classes, and there are quite a few classes.
I can prioritize this for the next release since there were other issues with the importer that would require importing again.
Wanted to comment that as of today the basic system is completed, and that the VW4 importer has been updated to use it. I will probably finish updating the VW3 importer by end of day, and then this issue can be closed.
Uninstall/reinstall is one way. In Beta 7, you can also call the following from a PHP script (usually from inside controller/cp/impex, because it's a protected method):
Code:
vw_Hard_Core::controller('CP/Impex')->clear()
That will delete everything in the wiki except for the default data.
Once IDs are maintained, we can make a less destructive clear() method.
This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.