@@ -, +, @@ changes --- 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 --- a/Koha/Schema/Result/ColumnsSetting.pm +++ a/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 + +=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 + +=item * L + +=item * L + +=item * L + +=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; --- a/installer/data/mysql/kohastructure.sql +++ a/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 */; --- a/installer/data/mysql/updatedatabase.pl +++ a/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) --