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

(-)a/installer/data/mysql/atomicupdate/bug_38689.pl (+31 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "38689",
6
    description => "Add edifact_errors table to record edifact error messages",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        if ( !TableExists('edifact_errors') ) {
12
            $dbh->do(
13
                q{
14
                CREATE TABLE `edifact_errors` (
15
                  `id` int(11) NOT NULL AUTO_INCREMENT,
16
                  `message_id` int(11) NOT NULL,
17
                  `date` date DEFAULT NULL,
18
                  `section` mediumtext DEFAULT NULL,
19
                  `details` mediumtext DEFAULT NULL,
20
                  PRIMARY KEY (`id`),
21
                  KEY `messageid` (`message_id`),
22
                  CONSTRAINT `emfk_message` FOREIGN KEY (`message_id`) REFERENCES `edifact_messages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
23
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
24
            }
25
            );
26
            say_success( $out, "Added new table 'edifect_errors'" );
27
        } else {
28
            say_info( $out, "Table already exists" );
29
        }
30
    },
31
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +19 lines)
Lines 2903-2908 CREATE TABLE `edifact_messages` ( Link Here
2903
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2903
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2904
/*!40101 SET character_set_client = @saved_cs_client */;
2904
/*!40101 SET character_set_client = @saved_cs_client */;
2905
2905
2906
--
2907
-- Table structure for table `edifact_errors`
2908
--
2909
2910
DROP TABLE IF EXISTS `edifact_errors`;
2911
/*!40101 SET @saved_cs_client     = @@character_set_client */;
2912
/*!40101 SET character_set_client = utf8 */;
2913
CREATE TABLE `edifact_errors` (
2914
  `id` int(11) NOT NULL AUTO_INCREMENT,
2915
  `message_id` int(11) NOT NULL,
2916
  `date` date DEFAULT NULL,
2917
  `section` mediumtext DEFAULT NULL,
2918
  `details` mediumtext DEFAULT NULL,
2919
  PRIMARY KEY (`id`),
2920
  KEY `messageid` (`message_id`),
2921
  CONSTRAINT `emfk_message` FOREIGN KEY (`message_id`) REFERENCES `edifact_messages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
2922
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2923
/*!40101 SET character_set_client = @saved_cs_client */;
2924
2906
--
2925
--
2907
-- Table structure for table `erm_agreement_licenses`
2926
-- Table structure for table `erm_agreement_licenses`
2908
--
2927
--
2909
- 

Return to bug 38689