View | Details | Raw Unified | Return to bug 17170
Collapse All | Expand All

(-)a/Koha/Schema/Result/SearchFilter.pm (-6 / +12 lines)
Lines 23-29 __PACKAGE__->table("search_filters"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 id
26
=head2 search_filter_id
27
27
28
  data_type: 'integer'
28
  data_type: 'integer'
29
  is_auto_increment: 1
29
  is_auto_increment: 1
Lines 35-50 __PACKAGE__->table("search_filters"); Link Here
35
  is_nullable: 0
35
  is_nullable: 0
36
  size: 255
36
  size: 255
37
37
38
filter name
39
38
=head2 query
40
=head2 query
39
41
40
  data_type: 'mediumtext'
42
  data_type: 'mediumtext'
41
  is_nullable: 1
43
  is_nullable: 1
42
44
45
filter query part
46
43
=head2 limits
47
=head2 limits
44
48
45
  data_type: 'mediumtext'
49
  data_type: 'mediumtext'
46
  is_nullable: 1
50
  is_nullable: 1
47
51
52
filter limits part
53
48
=head2 opac
54
=head2 opac
49
55
50
  data_type: 'tinyint'
56
  data_type: 'tinyint'
Lines 64-70 whether this filter is shown in staff client Link Here
64
=cut
70
=cut
65
71
66
__PACKAGE__->add_columns(
72
__PACKAGE__->add_columns(
67
  "id",
73
  "search_filter_id",
68
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
74
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
69
  "name",
75
  "name",
70
  { data_type => "varchar", is_nullable => 0, size => 255 },
76
  { data_type => "varchar", is_nullable => 0, size => 255 },
Lines 82-98 __PACKAGE__->add_columns( Link Here
82
88
83
=over 4
89
=over 4
84
90
85
=item * L</id>
91
=item * L</search_filter_id>
86
92
87
=back
93
=back
88
94
89
=cut
95
=cut
90
96
91
__PACKAGE__->set_primary_key("id");
97
__PACKAGE__->set_primary_key("search_filter_id");
92
98
93
99
94
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-06 12:05:17
100
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-06 12:25:18
95
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8QjxOudinfXOrLj/KkZc5Q
101
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:De9VF9DBMhzsbPIbyFGXlQ
96
102
97
__PACKAGE__->add_columns(
103
__PACKAGE__->add_columns(
98
    '+opac'         => { is_boolean => 1 },
104
    '+opac'         => { is_boolean => 1 },
(-)a/installer/data/mysql/atomicupdate/bug_17170.pl (-8 / +8 lines)
Lines 14-27 return { Link Here
14
        unless( TableExists( 'search_filters' ) ){
14
        unless( TableExists( 'search_filters' ) ){
15
            $dbh->do(q{
15
            $dbh->do(q{
16
                CREATE TABLE `search_filters` (
16
                CREATE TABLE `search_filters` (
17
                  id int(11) NOT NULL auto_increment, -- unique identifier for each search filter
17
                `search_filter_id` int(11) NOT NULL AUTO_INCREMENT,
18
                  name varchar(255) NOT NULL, -- display name for this filter
18
                `name` varchar(255) NOT NULL COMMENT 'filter name',
19
                  query mediumtext DEFAULT NULL, -- query part of the filter, can be blank
19
                `query` mediumtext NULL DEFAULT NULL COMMENT 'filter query part',
20
                  limits mediumtext DEFAULT NULL, -- limits part of the filter, can be blank
20
                `limits` mediumtext NULL DEFAULT NULL COMMENT 'filter limits part',
21
                  opac tinyint(1) NOT NULL DEFAULT 0, -- whether this filter is shown on OPAC
21
                `opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown on OPAC',
22
                  staff_client tinyint(1) NOT NULL DEFAULT 0, -- whether this filter is shown in staff client
22
                `staff_client` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown in staff client',
23
                  PRIMARY KEY (id)
23
                PRIMARY KEY (`search_filter_id`)
24
                ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
24
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
25
            });
25
            });
26
            say $out "Added search_filters table";
26
            say $out "Added search_filters table";
27
        } else {
27
        } else {
(-)a/installer/data/mysql/kohastructure.sql (-6 / +5 lines)
Lines 4731-4743 DROP TABLE IF EXISTS `search_filters`; Link Here
4731
/*!40101 SET @saved_cs_client     = @@character_set_client */;
4731
/*!40101 SET @saved_cs_client     = @@character_set_client */;
4732
/*!40101 SET character_set_client = utf8 */;
4732
/*!40101 SET character_set_client = utf8 */;
4733
CREATE TABLE `search_filters` (
4733
CREATE TABLE `search_filters` (
4734
  `id` int(11) NOT NULL AUTO_INCREMENT,
4734
  `search_filter_id` int(11) NOT NULL AUTO_INCREMENT,
4735
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
4735
  `name` varchar(255) NOT NULL COMMENT 'filter name',
4736
  `query` mediumtext COLLATE utf8mb4_unicode_ci,
4736
  `query` mediumtext NULL DEFAULT NULL COMMENT 'filter query part',
4737
  `limits` mediumtext COLLATE utf8mb4_unicode_ci,
4737
  `limits` mediumtext NULL DEFAULT NULL COMMENT 'filter limits part',
4738
  `opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown on OPAC',
4738
  `opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown on OPAC',
4739
  `staff_client` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown in staff client',
4739
  `staff_client` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'whether this filter is shown in staff client',
4740
  PRIMARY KEY (`id`)
4740
  PRIMARY KEY (`search_filter_id`)
4741
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4741
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4742
/*!40101 SET character_set_client = @saved_cs_client */;
4742
/*!40101 SET character_set_client = @saved_cs_client */;
4743
4743
4744
- 

Return to bug 17170