Hi, +1 from me (see comments below). I took it for a spin. Works nicely and passes invenio-check-branch.
I'm in favour of replacing the existing --drop-tables with the new --drop-all-tables, so there's only one option to drop tables (less confusion) 1) In OpenAIRE I'm currently simply dropping the entire database and creating it again since --drop-tables doesn't drop my OpenAIRE tables.
2) Drop-tables is mainly useful for developers and not normal users.Source is based against master. I think this is ok, as it changes behaviour of an existing option (assuming it's replacing --drop-tables). Otherwise it could in principle be backported to maint-1.1 or maint-1.0.
Commit message needs minor rephrasing for consistency: - first line: Inveniocfg -> inveniocfg - first line: too long (>50 chars)- add bullet to paragraph (see example in "git log" or https://twiki.cern.ch/twiki/bin/view/CDS/GitWorkflow#R1_Remarks_on_Git_log_messages)
I'll check at DevForum today if it can be integrated. Cheers, Lars On 22/11/12 15:22, Piotr Praczyk wrote:
Hey ! I have created a small patch for Invenio allowing easier dropping of DB tables. This patch solves my problems caused by working with different versions of Invenio on the same machine and database. There are 2 main uses: 1) Someone wants to downgrade Invenio (or in general drop database using different version that was used for the creation). In such case tabdrop.sql is incompatible with tabcreate.sql used to build the database. 2) Someone has tables created by external scripts (or for example some updater scripts which create backup tables) The new option is: --drop-all-tables and removes all database tables regardless if they are specified in tabdrop.sql When after user runs inveniocfg with --drop-tables option, some tables remain - a warning is generated and names of all remaining tables are listed. (With a suggestion that user might want to execute --drop-all-tables) Could we integrate this mini-branch in master ? It is useful for development and maybe for some end-users. I know that this option is a bit more risky to use... so maybe if it is not desired to be publicly visible ( less interesting for end-users than developers) - maybe we could make it a hidden undocumented option, yet accepted by inveniocfg ? The branch is available under the name warning_droptables in my public repository or: http://invenio-software.org/repo/personal/invenio-ppraczyk/log/?h=warning_droptables Cheers Piotr (ok ;) I have written more e-mail to justify than code ;) )
-- Lars Holm Nielsen Software Engineer CERN, IT Department, Digital Library Technology Section Office 513/1-014 Tel: +41 22 76 79182 Cel: +41 76 672 8927
smime.p7s
Description: S/MIME Cryptographic Signature

