auto/share/dist/Zonemaster-Backend/patch/patch_postgresql_db_zonemaster_backend_ver_5.0.0.pl untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 1 SCAR 6.9
CC
1
Cov
0%
patch_db
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use strict;
2 use warnings;
3  
4 use DBI qw(:utils);
5  
6 use Zonemaster::Backend::Config;
7 use Zonemaster::Backend::DB::PostgreSQL;
8  
9 my $config = Zonemaster::Backend::Config->load_config();
10 if ( $config->DB_engine ne 'PostgreSQL' ) {
11 die "The configuration file does not contain the PostgreSQL backend";
12 }
13 my $dbh = Zonemaster::Backend::DB::PostgreSQL->from_config( $config )->dbh;
14  
15 sub patch_db {
16  
17 ####################################################################
18 # TEST RESULTS
19 ####################################################################
20 $dbh->do( 'ALTER TABLE test_results ADD COLUMN nb_retries INTEGER NOT NULL DEFAULT 0' );
21 }
22  
23 patch_db();