Bugzilla – Attachment 29883 Details for
Bug 10212
Columns configuration for tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10212: Columns configuration for tables - DB changes
PASSED-QA-Bug-10212-Columns-configuration-for-tabl.patch (text/plain), 4.61 KB, created by
Katrin Fischer
on 2014-07-20 19:56:33 UTC
(
hide
)
Description:
[PASSED QA] Bug 10212: Columns configuration for tables - DB changes
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-20 19:56:33 UTC
Size:
4.61 KB
patch
obsolete
>From 71a522056de87b6ecfd7116decd7562c83a5ff11 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 7 Jul 2014 13:16:08 +0200 >Subject: [PATCH] [PASSED QA] Bug 10212: Columns configuration for tables - DB > changes > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > Koha/Schema/Result/ColumnsSetting.pm | 103 +++++++++++++++++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 14 +++++ > installer/data/mysql/updatedatabase.pl | 22 +++++++ > 3 files changed, 139 insertions(+) > create mode 100644 Koha/Schema/Result/ColumnsSetting.pm > >diff --git a/Koha/Schema/Result/ColumnsSetting.pm b/Koha/Schema/Result/ColumnsSetting.pm >new file mode 100644 >index 0000000..05d65fa >--- /dev/null >+++ b/Koha/Schema/Result/ColumnsSetting.pm >@@ -0,0 +1,103 @@ >+use utf8; >+package Koha::Schema::Result::ColumnsSetting; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::ColumnsSetting >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<columns_settings> >+ >+=cut >+ >+__PACKAGE__->table("columns_settings"); >+ >+=head1 ACCESSORS >+ >+=head2 module >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=head2 page >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=head2 tablename >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=head2 columnname >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 255 >+ >+=head2 cannot_be_toggled >+ >+ data_type: 'integer' >+ default_value: 0 >+ is_nullable: 0 >+ >+=head2 is_hidden >+ >+ data_type: 'integer' >+ default_value: 0 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "module", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "page", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "tablename", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "columnname", >+ { data_type => "varchar", is_nullable => 0, size => 255 }, >+ "cannot_be_toggled", >+ { data_type => "integer", default_value => 0, is_nullable => 0 }, >+ "is_hidden", >+ { data_type => "integer", default_value => 0, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</module> >+ >+=item * L</page> >+ >+=item * L</tablename> >+ >+=item * L</columnname> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("module", "page", "tablename", "columnname"); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-07 12:11:07 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s4Zkf15c4v0RJyb1S5UTPA >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index b46dc6a..ba2f157 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3422,6 +3422,20 @@ CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to rec > KEY `record_id` (`record_id`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > >+-- >+-- Table structure for table `columns_settings` >+-- >+ >+CREATE TABLE IF NOT EXISTS columns_settings ( >+ module varchar(255) NOT NULL, >+ page varchar(255) NOT NULL, >+ tablename varchar(255) NOT NULL, >+ columnname varchar(255) NOT NULL, >+ cannot_be_toggled int(1) NOT NULL DEFAULT 0, >+ is_hidden int(1) NOT NULL DEFAULT 0, >+ PRIMARY KEY(module, page, tablename, columnname) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 1030454..f9bb67a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8570,6 +8570,28 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+ >+ >+ >+ >+$DBversion = "3.17.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q{ >+ CREATE TABLE IF NOT EXISTS columns_settings ( >+ module varchar(255) NOT NULL, >+ page varchar(255) NOT NULL, >+ tablename varchar(255) NOT NULL, >+ columnname varchar(255) NOT NULL, >+ cannot_be_toggled int(1) NOT NULL DEFAULT 0, >+ is_hidden int(1) NOT NULL DEFAULT 0, >+ PRIMARY KEY(module, page, tablename, columnname) >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 >+ }); >+ print "Upgrade to $DBversion done (Bug 10212 - Create new table columns_settings)\n"; >+ SetVersion ($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.9.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 10212
:
17978
|
17979
|
18861
|
20625
|
20640
|
21178
|
21179
|
21180
|
21583
|
21584
|
21585
|
24083
|
24084
|
24085
|
24149
|
24150
|
24151
|
24167
|
24168
|
24577
|
27700
|
27701
|
27702
|
27703
|
27704
|
27705
|
29075
|
29076
|
29077
|
29078
|
29079
|
29080
|
29537
|
29538
|
29539
|
29540
|
29541
|
29701
|
29702
|
29703
|
29704
|
29705
|
29718
|
29830
|
29836
|
29837
|
29838
|
29839
|
29840
|
29841
|
29842
|
29882
| 29883 |
29884
|
29885
|
29886
|
29887
|
29888
|
29947
|
31158
|
31159