Bug 23681: (QA follow-up) Rename columns

Renames ronly to readonly and dflt to is_system.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2022-03-28 12:40:55 +01:00 committed by Tomas Cohen Arazi
parent 67b03d9374
commit eb28de78fe
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
6 changed files with 26 additions and 26 deletions

View File

@ -7,12 +7,12 @@ if ( CheckVersion( $DBversion ) ) {
CREATE TABLE debarment_types (
code varchar(50) NOT NULL PRIMARY KEY,
display_text text NOT NULL,
ronly tinyint(1) NOT NULL DEFAULT 0,
dflt tinyint(1) NOT NULL DEFAULT 0
readonly tinyint(1) NOT NULL DEFAULT 0,
system tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
| );
$dbh->do( q|
INSERT INTO debarment_types (code, display_text, ronly, dflt) VALUES
INSERT INTO debarment_types (code, display_text, readonly, system) VALUES
('MANUAL', 'Manual', 1, 1),
('OVERDUES', 'Overdues', 1, 0),
('SUSPENSION', 'Suspension', 1, 0),

View File

@ -1,4 +1,4 @@
INSERT INTO debarment_types (code, display_text, ronly, dflt) VALUES
INSERT INTO debarment_types (code, display_text, readonly, system) VALUES
('MANUAL', 'Manual', 1, 1),
('OVERDUES', 'Overdues', 1, 0),
('SUSPENSION', 'Suspension', 1, 0),

View File

@ -2085,8 +2085,8 @@ DROP TABLE IF EXISTS `debarment_types`;
CREATE TABLE debarment_types (
code varchar(50) NOT NULL PRIMARY KEY,
display_text text NOT NULL,
ronly tinyint(1) NOT NULL DEFAULT 0,
dflt tinyint(1) NOT NULL DEFAULT 0
readonly tinyint(1) NOT NULL DEFAULT 0,
is_system tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--

View File

@ -170,11 +170,11 @@
[% restriction.display_text | html %]
</td>
<td>
[% IF restriction.dflt %]Yes[% END %]
[% IF restriction.is_system %]Yes[% END %]
</td>
<td class="actions">
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/restrictions.pl?op=add_form&amp;code=[% restriction.code | uri %]"><i class="fa fa-pencil"></i> Edit</a>
[% IF !restriction.ronly %]
[% IF !restriction.readonly %]
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/restrictions.pl?op=delete_confirm&amp;code=[% restriction.code | uri %]"><i class="fa fa-trash"></i> Delete</a>
[% END %]
</td>

View File

@ -24,8 +24,8 @@ $builder->build({
value => {
code => 'ONE',
display_text => 'One',
ronly => 1,
dflt => 0
readonly => 1,
is_system => 0
}
});
$builder->build({
@ -33,8 +33,8 @@ $builder->build({
value => {
code => 'TWO',
display_text => 'Two',
ronly => 1,
dflt => 1
readonly => 1,
is_system => 1
}
});
@ -44,14 +44,14 @@ my $expecting = {
ONE => {
code => 'ONE',
display_text => 'One',
ronly => 1,
dflt => 0
readonly => 1,
is_system => 0
},
TWO => {
code => 'TWO',
display_text => 'Two',
ronly => 1,
dflt => 1
readonly => 1,
is_system => 1
}
};

View File

@ -24,8 +24,8 @@ $builder->build({
value => {
code => 'ONE',
display_text => 'One',
ronly => 1,
dflt => 0
readonly => 1,
is_system => 0
}
});
$builder->build({
@ -33,8 +33,8 @@ $builder->build({
value => {
code => 'TWO',
display_text => 'Two',
ronly => 1,
dflt => 1
readonly => 1,
is_system => 1
}
});
$builder->build({
@ -42,8 +42,8 @@ $builder->build({
value => {
code => 'THREE',
display_text => 'Three',
ronly => 1,
dflt => 0
readonly => 1,
is_system => 0
}
});
$builder->build({
@ -51,8 +51,8 @@ $builder->build({
value => {
code => 'FOUR',
display_text => 'Four',
ronly => 0,
dflt => 0
readonly => 0,
is_system => 0
}
});
$builder->build({
@ -60,8 +60,8 @@ $builder->build({
value => {
code => 'FIVE',
display_text => 'Five',
ronly => 0,
dflt => 0
readonly => 0,
is_system => 0
}
});