Bugzilla – Attachment 103085 Details for
Bug 24807
Add "year" type to improve sorting by publication date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24807: Add database update script
Bug-24807-Add-database-update-script.patch (text/plain), 1.20 KB, created by
David Gustafsson
on 2020-04-16 12:53:09 UTC
(
hide
)
Description:
Bug 24807: Add database update script
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2020-04-16 12:53:09 UTC
Size:
1.20 KB
patch
obsolete
>From 908b4ca9d0fd8e3bc04dc21aa235cf8f42d7853d Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Thu, 5 Mar 2020 11:35:32 +0100 >Subject: [PATCH] Bug 24807: Add database update script > >--- > .../atomicupdate/bug_24807-add-year-search-field-type.perl | 7 +++++++ > 1 file changed, 7 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_24807-add-year-search-field-type.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_24807-add-year-search-field-type.perl b/installer/data/mysql/atomicupdate/bug_24807-add-year-search-field-type.perl >new file mode 100644 >index 0000000000..480072c880 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24807-add-year-search-field-type.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( "ALTER TABLE `search_field` MODIFY COLUMN `type` enum('','string','date','number','boolean','sum','isbn','stdno','year') NOT NULL" ); >+ $dbh->do( "UPDATE `search_field` SET type = 'year' WHERE name = 'date-of-publication'" ); >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 14957 - Add 'year' type to improve sorting behaviour)\n"; >+} >-- >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 24807
:
100170
|
100171
|
100176
|
102547
|
102548
|
103084
|
103085
|
103086
|
103087
|
103163
|
103277
|
104525
|
104526
|
104527
|
104528
|
104529
|
104530
|
104531
|
106768
|
108382
|
108383
|
108384
|
108385
|
108386
|
108387
|
108388
|
108389
|
109997
|
109998
|
109999
|
110000
|
110001
|
110002
|
110003
|
110004
|
110355
|
110884