Bugzilla – Attachment 37121 Details for
Bug 13893
Add ability to execute perl scripts in atomicupdates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13893 - Add ability to execute perl scripts in atomicupdates
Bug-13893---Add-ability-to-execute-perl-scripts-in.patch (text/plain), 2.15 KB, created by
Kyle M Hall (khall)
on 2015-03-23 13:15:37 UTC
(
hide
)
Description:
Bug 13893 - Add ability to execute perl scripts in atomicupdates
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-03-23 13:15:37 UTC
Size:
2.15 KB
patch
obsolete
>From c8c6d18894d4250768f1f4d5b8d1ffe6cb372fa4 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 23 Mar 2015 09:13:30 -0400 >Subject: [PATCH] Bug 13893 - Add ability to execute perl scripts in atomicupdates > >Bug 13068 adds the ability to execute sql files from atomicupdates for >in process developments to reduce merge conflicts. We need to extend >this ability further to be able to handle perl code. > >Test Plan: >1) Apply this patch set >2) Run updatedatabase.pl >3) You should see the output "Upgrade to XXX done (Bug 13893 - Add ability to execute perl scripts in atomicupdates)" >--- > installer/data/mysql/atomicupdate/test_bz13068.sql | 3 --- > installer/data/mysql/updatedatabase.pl | 11 +++++++---- > 2 files changed, 7 insertions(+), 7 deletions(-) > delete mode 100644 installer/data/mysql/atomicupdate/test_bz13068.sql > >diff --git a/installer/data/mysql/atomicupdate/test_bz13068.sql b/installer/data/mysql/atomicupdate/test_bz13068.sql >deleted file mode 100644 >index 251ff27..0000000 >--- a/installer/data/mysql/atomicupdate/test_bz13068.sql >+++ /dev/null >@@ -1,3 +0,0 @@ >-CREATE TABLE test (`test` CHAR(8)); >-INSERT INTO test (test) values ('1'), >- ('2'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 7207f82..04aff47 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9916,10 +9916,13 @@ if(CheckVersion($DBversion)) { > my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; > opendir( my $dirh, $update_dir ); > while ( my $file = readdir $dirh ) { >- next unless $file =~ /\.sql$/; # skip non SQL files >- print "DEV atomic update : $file \n"; >- my $installer = C4::Installer->new(); >- my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; >+ if ( $file =~ /\.sql$/ ) { # skip non SQL files >+ print "DEV atomic update : $file \n"; >+ my $installer = C4::Installer->new(); >+ my $rv = $installer->load_sql( $update_dir . $file ) ? 0 : 1; >+ } elsif ( $file =~ /\.perl$/ ) { >+ do $update_dir . $file; >+ } > } > > >-- >1.7.2.5
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 13893
:
37120
|
37121
|
37122
|
37123
|
37389
|
37997
|
37998