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 (-2 / +20 lines)
Lines 2925-2930 CREATE TABLE `edifact_messages` ( Link Here
2925
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2925
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2926
/*!40101 SET character_set_client = @saved_cs_client */;
2926
/*!40101 SET character_set_client = @saved_cs_client */;
2927
2927
2928
--
2929
-- Table structure for table `edifact_errors`
2930
--
2931
2932
DROP TABLE IF EXISTS `edifact_errors`;
2933
/*!40101 SET @saved_cs_client     = @@character_set_client */;
2934
/*!40101 SET character_set_client = utf8 */;
2935
CREATE TABLE `edifact_errors` (
2936
  `id` int(11) NOT NULL AUTO_INCREMENT,
2937
  `message_id` int(11) NOT NULL,
2938
  `date` date DEFAULT NULL,
2939
  `section` mediumtext DEFAULT NULL,
2940
  `details` mediumtext DEFAULT NULL,
2941
  PRIMARY KEY (`id`),
2942
  KEY `messageid` (`message_id`),
2943
  CONSTRAINT `emfk_message` FOREIGN KEY (`message_id`) REFERENCES `edifact_messages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
2944
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2945
/*!40101 SET character_set_client = @saved_cs_client */;
2946
2928
--
2947
--
2929
-- Table structure for table `erm_agreement_licenses`
2948
-- Table structure for table `erm_agreement_licenses`
2930
--
2949
--
Lines 6777-6780 CREATE TABLE `zebraqueue` ( Link Here
6777
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6796
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6778
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6797
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6779
6798
6780
-- Dump completed on 2024-11-25 12:13:27
6799
-- Dump completed on 2024-11-25 12:13:27
6781
- 

Return to bug 38689