Bugzilla – Attachment 141436 Details for
Bug 17170
Add the ability to create 'saved searches' for use as filters when searching the catalog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17170: (QA follow-up) DB changes
Bug-17170-QA-follow-up-DB-changes.patch (text/plain), 5.06 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-10-06 14:28:27 UTC
(
hide
)
Description:
Bug 17170: (QA follow-up) DB changes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-10-06 14:28:27 UTC
Size:
5.06 KB
patch
obsolete
>From 8dbd0be11cc28a2ff46d972ea49f2b1a952d7123 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 6 Oct 2022 10:44:21 -0300 >Subject: [PATCH] Bug 17170: (QA follow-up) DB changes > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Schema/Result/SearchFilter.pm | 18 ++++++++++++------ > installer/data/mysql/atomicupdate/bug_17170.pl | 16 ++++++++-------- > installer/data/mysql/kohastructure.sql | 10 +++++----- > 3 files changed, 25 insertions(+), 19 deletions(-) > >diff --git a/Koha/Schema/Result/SearchFilter.pm b/Koha/Schema/Result/SearchFilter.pm >index 0939412b654..96a78c85af6 100644 >--- a/Koha/Schema/Result/SearchFilter.pm >+++ b/Koha/Schema/Result/SearchFilter.pm >@@ -23,7 +23,7 @@ __PACKAGE__->table("search_filters"); > > =head1 ACCESSORS > >-=head2 id >+=head2 search_filter_id > > data_type: 'integer' > is_auto_increment: 1 >@@ -35,16 +35,22 @@ __PACKAGE__->table("search_filters"); > is_nullable: 0 > size: 255 > >+filter name >+ > =head2 query > > data_type: 'mediumtext' > is_nullable: 1 > >+filter query part >+ > =head2 limits > > data_type: 'mediumtext' > is_nullable: 1 > >+filter limits part >+ > =head2 opac > > data_type: 'tinyint' >@@ -64,7 +70,7 @@ whether this filter is shown in staff client > =cut > > __PACKAGE__->add_columns( >- "id", >+ "search_filter_id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "name", > { data_type => "varchar", is_nullable => 0, size => 255 }, >@@ -82,17 +88,17 @@ __PACKAGE__->add_columns( > > =over 4 > >-=item * L</id> >+=item * L</search_filter_id> > > =back > > =cut > >-__PACKAGE__->set_primary_key("id"); >+__PACKAGE__->set_primary_key("search_filter_id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-06 12:05:17 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8QjxOudinfXOrLj/KkZc5Q >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-06 12:25:18 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:De9VF9DBMhzsbPIbyFGXlQ > > __PACKAGE__->add_columns( > '+opac' => { is_boolean => 1 }, >diff --git a/installer/data/mysql/atomicupdate/bug_17170.pl b/installer/data/mysql/atomicupdate/bug_17170.pl >index 650e7831c34..70b9d1f827c 100755 >--- a/installer/data/mysql/atomicupdate/bug_17170.pl >+++ b/installer/data/mysql/atomicupdate/bug_17170.pl >@@ -14,14 +14,14 @@ return { > unless( TableExists( 'search_filters' ) ){ > $dbh->do(q{ > CREATE TABLE `search_filters` ( >- id int(11) NOT NULL auto_increment, -- unique identifier for each search filter >- name varchar(255) NOT NULL, -- display name for this filter >- query mediumtext DEFAULT NULL, -- query part of the filter, can be blank >- limits mediumtext DEFAULT NULL, -- limits part of the filter, can be blank >- opac tinyint(1) NOT NULL DEFAULT 0, -- whether this filter is shown on OPAC >- staff_client tinyint(1) NOT NULL DEFAULT 0, -- whether this filter is shown in staff client >- PRIMARY KEY (id) >- ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; >+ `search_filter_id` int(11) NOT NULL AUTO_INCREMENT, >+ `name` varchar(255) NOT NULL COMMENT 'filter name', >+ `query` mediumtext NULL DEFAULT NULL COMMENT 'filter query part', >+ `limits` mediumtext NULL DEFAULT NULL COMMENT 'filter limits part', >+ `opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown on OPAC', >+ `staff_client` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown in staff client', >+ PRIMARY KEY (`search_filter_id`) >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > }); > say $out "Added search_filters table"; > } else { >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 8dd0d1eb254..cb94fb47e49 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4728,13 +4728,13 @@ DROP TABLE IF EXISTS `search_filters`; > /*!40101 SET @saved_cs_client = @@character_set_client */; > /*!40101 SET character_set_client = utf8 */; > CREATE TABLE `search_filters` ( >- `id` int(11) NOT NULL AUTO_INCREMENT, >- `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, >- `query` mediumtext COLLATE utf8mb4_unicode_ci, >- `limits` mediumtext COLLATE utf8mb4_unicode_ci, >+ `search_filter_id` int(11) NOT NULL AUTO_INCREMENT, >+ `name` varchar(255) NOT NULL COMMENT 'filter name', >+ `query` mediumtext NULL DEFAULT NULL COMMENT 'filter query part', >+ `limits` mediumtext NULL DEFAULT NULL COMMENT 'filter limits part', > `opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown on OPAC', > `staff_client` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown in staff client', >- PRIMARY KEY (`id`) >+ PRIMARY KEY (`search_filter_id`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; > >-- >2.34.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 17170
:
133263
|
133264
|
133265
|
133266
|
133267
|
133268
|
133269
|
133270
|
133361
|
133376
|
137027
|
137028
|
137029
|
137030
|
137031
|
137032
|
137033
|
137034
|
137035
|
137036
|
137186
|
137187
|
137188
|
137189
|
137190
|
137191
|
137192
|
137193
|
137194
|
137195
|
137808
|
137809
|
137810
|
137811
|
137812
|
137813
|
137814
|
137815
|
137816
|
137817
|
138505
|
138506
|
138507
|
138508
|
138509
|
138510
|
138511
|
138512
|
138513
|
138514
|
139948
|
139949
|
139950
|
139951
|
139952
|
139953
|
139954
|
139955
|
139956
|
139957
|
141228
|
141229
|
141230
|
141231
|
141232
|
141233
|
141234
|
141235
|
141236
|
141237
|
141316
|
141317
|
141318
|
141319
|
141320
|
141321
|
141322
|
141323
|
141324
|
141325
|
141326
|
141327
|
141328
|
141348
|
141349
|
141350
|
141351
|
141352
|
141353
|
141354
|
141355
|
141356
|
141357
|
141358
|
141359
|
141360
|
141422
|
141423
|
141424
|
141425
|
141426
|
141427
|
141428
|
141429
|
141430
|
141431
|
141432
|
141433
|
141434
|
141435
|
141436
|
141437
|
141438
|
141461
|
141462
|
142365
|
142367
|
142368
|
142369
|
142370
|
142371
|
142372
|
142373
|
142374
|
142375
|
142376
|
142377
|
142378
|
142379
|
142380
|
142381
|
142382
|
142383
|
142384
|
142385
|
142494
|
142498