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

(-)a/Koha/Schema/Result/ColumnsSetting.pm (+103 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::ColumnsSetting;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::ColumnsSetting
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<columns_settings>
19
20
=cut
21
22
__PACKAGE__->table("columns_settings");
23
24
=head1 ACCESSORS
25
26
=head2 module
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 255
31
32
=head2 page
33
34
  data_type: 'varchar'
35
  is_nullable: 0
36
  size: 255
37
38
=head2 tablename
39
40
  data_type: 'varchar'
41
  is_nullable: 0
42
  size: 255
43
44
=head2 columnname
45
46
  data_type: 'varchar'
47
  is_nullable: 0
48
  size: 255
49
50
=head2 cannot_be_toggled
51
52
  data_type: 'integer'
53
  default_value: 0
54
  is_nullable: 0
55
56
=head2 is_hidden
57
58
  data_type: 'integer'
59
  default_value: 0
60
  is_nullable: 0
61
62
=cut
63
64
__PACKAGE__->add_columns(
65
  "module",
66
  { data_type => "varchar", is_nullable => 0, size => 255 },
67
  "page",
68
  { data_type => "varchar", is_nullable => 0, size => 255 },
69
  "tablename",
70
  { data_type => "varchar", is_nullable => 0, size => 255 },
71
  "columnname",
72
  { data_type => "varchar", is_nullable => 0, size => 255 },
73
  "cannot_be_toggled",
74
  { data_type => "integer", default_value => 0, is_nullable => 0 },
75
  "is_hidden",
76
  { data_type => "integer", default_value => 0, is_nullable => 0 },
77
);
78
79
=head1 PRIMARY KEY
80
81
=over 4
82
83
=item * L</module>
84
85
=item * L</page>
86
87
=item * L</tablename>
88
89
=item * L</columnname>
90
91
=back
92
93
=cut
94
95
__PACKAGE__->set_primary_key("module", "page", "tablename", "columnname");
96
97
98
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-07 12:11:07
99
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s4Zkf15c4v0RJyb1S5UTPA
100
101
102
# You can replace this text with custom code or comments, and it will be preserved on regeneration
103
1;
(-)a/installer/data/mysql/kohastructure.sql (+14 lines)
Lines 3422-3427 CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to rec Link Here
3422
  KEY `record_id` (`record_id`)
3422
  KEY `record_id` (`record_id`)
3423
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3423
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3424
3424
3425
--
3426
-- Table structure for table `columns_settings`
3427
--
3428
3429
CREATE TABLE IF NOT EXISTS columns_settings (
3430
    module varchar(255) NOT NULL,
3431
    page varchar(255) NOT NULL,
3432
    tablename varchar(255) NOT NULL,
3433
    columnname varchar(255) NOT NULL,
3434
    cannot_be_toggled int(1) NOT NULL DEFAULT 0,
3435
    is_hidden int(1) NOT NULL DEFAULT 0,
3436
    PRIMARY KEY(module, page, tablename, columnname)
3437
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3438
3425
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
3439
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
3426
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
3440
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
3427
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
3441
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +22 lines)
Lines 8570-8575 if ( CheckVersion($DBversion) ) { Link Here
8570
    SetVersion($DBversion);
8570
    SetVersion($DBversion);
8571
}
8571
}
8572
8572
8573
8574
8575
8576
8577
$DBversion = "3.17.00.XXX";
8578
if ( CheckVersion($DBversion) ) {
8579
    $dbh->do(q{
8580
        CREATE TABLE IF NOT EXISTS columns_settings (
8581
            module varchar(255) NOT NULL,
8582
            page varchar(255) NOT NULL,
8583
            tablename varchar(255) NOT NULL,
8584
            columnname varchar(255) NOT NULL,
8585
            cannot_be_toggled int(1) NOT NULL DEFAULT 0,
8586
            is_hidden int(1) NOT NULL DEFAULT 0,
8587
            PRIMARY KEY(module, page, tablename, columnname)
8588
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8
8589
    });
8590
    print "Upgrade to $DBversion done (Bug 10212 - Create new table columns_settings)\n";
8591
    SetVersion ($DBversion);
8592
}
8593
8594
8573
=head1 FUNCTIONS
8595
=head1 FUNCTIONS
8574
8596
8575
=head2 TableExists($table)
8597
=head2 TableExists($table)
8576
- 

Return to bug 10212