Bugzilla – Attachment 43349 Details for
Bug 12478
Elasticsearch support for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12478: update the schema
Bug-12478-update-the-schema.patch (text/plain), 6.07 KB, created by
Jonathan Druart
on 2015-10-12 16:18:18 UTC
(
hide
)
Description:
Bug 12478: update the schema
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-12 16:18:18 UTC
Size:
6.07 KB
patch
obsolete
>From 60d6a9e3cc9f999b3bd176b55cd6f94a1b85900e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 12 Oct 2015 16:52:11 +0100 >Subject: [PATCH] Bug 12478: update the schema > >These files have been generated with the >misc/devel/update_dbix_class_files.pl script. >--- > Koha/Schema/Result/SearchField.pm | 20 ++++------- > Koha/Schema/Result/SearchMarcMap.pm | 61 +++++++++++---------------------- > Koha/Schema/Result/SearchMarcToField.pm | 35 +++++++++++++++++-- > 3 files changed, 58 insertions(+), 58 deletions(-) > >diff --git a/Koha/Schema/Result/SearchField.pm b/Koha/Schema/Result/SearchField.pm >index ce76534..b3ec809 100644 >--- a/Koha/Schema/Result/SearchField.pm >+++ b/Koha/Schema/Result/SearchField.pm >@@ -40,9 +40,11 @@ the name of the field as it will be stored in the search engine > =head2 label > > data_type: 'varchar' >- is_nullable: 1 >+ is_nullable: 0 > size: 255 > >+the human readable name of the field, for display >+ > =head2 type > > data_type: 'enum' >@@ -59,7 +61,7 @@ __PACKAGE__->add_columns( > "name", > { data_type => "varchar", is_nullable => 0, size => 255 }, > "label", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >+ { data_type => "varchar", is_nullable => 0, size => 255 }, > "type", > { > data_type => "enum", >@@ -111,19 +113,9 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 search_marc_maps >- >-Type: many_to_many >- >-Composing rels: L</search_marc_to_fields> -> search_marc_map >- >-=cut >- >-__PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map"); >- > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-09-25 15:21:43 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HD0m5hWYi/GXgz1rvk+Ipw >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-12 16:41:47 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4MJO9216VF37w7PlWCcBKg > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/SearchMarcMap.pm b/Koha/Schema/Result/SearchMarcMap.pm >index 304c4f0..2b00f84 100644 >--- a/Koha/Schema/Result/SearchMarcMap.pm >+++ b/Koha/Schema/Result/SearchMarcMap.pm >@@ -53,29 +53,6 @@ what MARC type this map is for > > the MARC specifier for this field > >-=head2 facet >- >- data_type: 'tinyint' >- default_value: 0 >- is_nullable: 1 >- >-true if a facet field should be generated for this >- >-=head2 suggestible >- >- data_type: 'tinyint' >- default_value: 0 >- is_nullable: 1 >- >-true if this field can be used to generate suggestions for browse >- >-=head2 sort >- >- data_type: 'tinyint' >- is_nullable: 1 >- >-true/false creates special sort handling, null doesn't >- > =cut > > __PACKAGE__->add_columns( >@@ -95,12 +72,6 @@ __PACKAGE__->add_columns( > }, > "marc_field", > { data_type => "varchar", is_nullable => 0, size => 255 }, >- "facet", >- { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >- "suggestible", >- { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >- "sort", >- { data_type => "tinyint", is_nullable => 1 }, > ); > > =head1 PRIMARY KEY >@@ -115,6 +86,24 @@ __PACKAGE__->add_columns( > > __PACKAGE__->set_primary_key("id"); > >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<index_name> >+ >+=over 4 >+ >+=item * L</index_name> >+ >+=item * L</marc_field> >+ >+=item * L</marc_type> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("index_name", ["index_name", "marc_field", "marc_type"]); >+ > =head1 RELATIONS > > =head2 search_marc_to_fields >@@ -132,19 +121,9 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 search_fields >- >-Type: many_to_many >- >-Composing rels: L</search_marc_to_fields> -> search_field >- >-=cut >- >-__PACKAGE__->many_to_many("search_fields", "search_marc_to_fields", "search_field"); >- > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-09-25 15:20:52 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o579otqUGA8XhO+NYv99dw >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-12 16:41:47 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nKMOxnAJST3zNN6Kxj2ynA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/SearchMarcToField.pm b/Koha/Schema/Result/SearchMarcToField.pm >index 8daccab..bfd27ea 100644 >--- a/Koha/Schema/Result/SearchMarcToField.pm >+++ b/Koha/Schema/Result/SearchMarcToField.pm >@@ -35,6 +35,29 @@ __PACKAGE__->table("search_marc_to_field"); > is_foreign_key: 1 > is_nullable: 0 > >+=head2 facet >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 1 >+ >+true if a facet field should be generated for this >+ >+=head2 suggestible >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 1 >+ >+true if this field can be used to generate suggestions for browse >+ >+=head2 sort >+ >+ data_type: 'tinyint' >+ is_nullable: 1 >+ >+true/false creates special sort handling, null doesn't >+ > =cut > > __PACKAGE__->add_columns( >@@ -42,6 +65,12 @@ __PACKAGE__->add_columns( > { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, > "search_field_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "facet", >+ { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >+ "suggestible", >+ { data_type => "tinyint", default_value => 0, is_nullable => 1 }, >+ "sort", >+ { data_type => "tinyint", is_nullable => 1 }, > ); > > =head1 PRIMARY KEY >@@ -72,7 +101,7 @@ __PACKAGE__->belongs_to( > "search_field", > "Koha::Schema::Result::SearchField", > { id => "search_field_id" }, >- { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > > =head2 search_marc_map >@@ -91,8 +120,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-09-25 15:19:43 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h9oY2xOGibcnsriEfcFe8A >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-12 16:41:47 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ccnCYwDdtPGZ/VArAe1kPA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >-- >2.1.0
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 12478
:
29204
|
31128
|
31129
|
33136
|
33137
|
33138
|
33139
|
33140
|
33141
|
35654
|
40903
|
42030
|
42031
|
42032
|
42033
|
42062
|
42063
|
42064
|
42065
|
42066
|
42067
|
42068
|
42069
|
42392
|
42393
|
43127
|
43128
|
43129
|
43130
|
43131
|
43132
|
43133
|
43134
|
43140
|
43141
|
43142
|
43148
|
43345
|
43346
|
43347
|
43348
|
43349
|
43350
|
43351
|
43352
|
43373
|
47767
|
47768
|
50115
|
50159
|
50211
|
50212
|
50213
|
50214
|
50245
|
50246
|
50291
|
50292