Bugzilla – Attachment 90854 Details for
Bug 23168
Database Updates broken due to conflicts in bug 21073 and bug 22053
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23168: Enable plugins using plain SQL
Bug-23168-Enable-plugins-using-plain-SQL.patch (text/plain), 2.00 KB, created by
Martin Renvoize (ashimema)
on 2019-06-20 15:36:11 UTC
(
hide
)
Description:
Bug 23168: Enable plugins using plain SQL
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-06-20 15:36:11 UTC
Size:
2.00 KB
patch
obsolete
>From 97aff159fa35c111a9a87bedd2c4aaba31c50ee6 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 20 Jun 2019 12:03:30 -0300 >Subject: [PATCH] Bug 23168: Enable plugins using plain SQL > >To test: >- On a clean 18.11.x, install a plugin [1] >- Run: > $ sudo koha-mysql kohadev > > SELECT * FROM plugin_data; >=> SUCCESS: Notice there's a __INSTALLED_VERSION__ line for your plugin >- Checkout latest master, restart all the things >- Run: > $ updatedatabase >=> FAIL: It fails on 18.12.00.069 because the plugin_methods table doesn't exist >- Run: > $ sudo koha-mysql kohadev > > SELECT * FROM plugin_data; >=> FAIL: No __ENABLED__ line for your plugin >- Apply the patch >- Run: > $ updatedatabase >=> SUCCESS: Update passes the 18.12.00.069 step correctly >- Run: > $ sudo koha-mysql kohadev > > SELECT * FROM plugin_data; >=> SUCCESS: There's an __ENABLED__ line for your plugin >- Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/updatedatabase.pl | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index fb123a02b2..7c8bec4e59 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -18435,12 +18435,16 @@ if ( CheckVersion($DBversion) ) { > $DBversion = '18.12.00.069'; > if( CheckVersion( $DBversion ) ) { > >- use Koha::Plugins; >- >- my @plugins = Koha::Plugins->new({ enable_plugins => 1 })->GetPlugins({ all => 1 }); >- foreach my $plugin ( @plugins ) { >- $plugin->enable; >- } >+ $dbh->do(q{ >+ INSERT INTO plugin_data >+ (plugin_class, plugin_key, plugin_value) >+ SELECT >+ plugin_class, >+ '__ENABLED__', >+ 1 >+ FROM plugin_data >+ WHERE plugin_key='__INSTALLED_VERSION__' >+ }); > > # Always end with this (adjust the bug info) > SetVersion( $DBversion ); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23168
:
90851
|
90852
|
90853
|
90854
|
90855