Installing a plugin via Git

Hi,

when I install a plugin via git, I run the upgrade script afterwards for the entries in the database.

If I do not want to risk the upgrade script running, would it be save to just add the entries that are needed to the tables ‘versions’ and ‘plugin_settings’? Or is there anything else I have to take care of?

I have for a sitewide plugin:

insert into versions values(1,0,0,0,NOW(),1,‘plugins.generic’,‘setTinyMCEFields’,‘SetTinyMCEFieldsPlugin’,1,1);

insert into plugin_settings values(‘settinymcefieldsplugin’,‘’,0,‘enabled’,‘1’,‘bool’);

and it seems to work fine.

best,
Carola

Hi @carola,

Yes, this should be a safe alternative to running the upgrade script. Note that installing plugins via the plugin gallery, or uploading them as .tar.gz files to the plugin management interface, will also create this entry.

I’ve just added a command-line tool to allow you to do this quickly from the CLI; see Add plugin version installation tool · Issue #2503 · pkp/pkp-lib · GitHub for details.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher,

thanks a lot for the tool, Alec!! Works perfectly,

best,
Carola