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

(-)a/installer/data/mysql/atomicupdate/bug_25905_import_oaipmh_biblios_table.perl (+25 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
4
    unless( TableExists('import_oaipmh_biblios') ) {
5
        $dbh->do(q{
6
			CREATE TABLE import_oaipmh_biblios (
7
				id INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
8
				repository MEDIUMTEXT NOT NULL, -- this is a URL so it needs to be long
9
				identifier MEDIUMTEXT NOT NULL, -- this is technically a URI
10
				datestamp datetime NOT NULL, -- this is a UTC timestamp
11
				deleted TINYINT(1) DEFAULT 0, -- boolean for header status of deleted
12
				metadata LONGTEXT NOT NULL, -- OAI-PMH encapsulated metadata
13
				frameworkcode varchar(4) NOT NULL, -- frameworkcode to use when importing
14
				biblionumber INT(11),
15
				last_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
16
				PRIMARY KEY (id),
17
				KEY biblionumber (biblionumber),
18
				CONSTRAINT FK_import_oaipmh_biblios_1 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE NO ACTION
19
			) ENGINE = INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
20
        });
21
    }
22
23
    # Always end with this (adjust the bug info)
24
    NewVersion( $DBversion, 25905, "Add a new 'import_oaipmh_biblios' table");
25
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +20 lines)
Lines 4570-4575 CREATE TABLE advanced_editor_macros ( Link Here
4570
    CONSTRAINT borrower_macro_fk FOREIGN KEY ( borrowernumber ) REFERENCES borrowers ( borrowernumber ) ON UPDATE CASCADE ON DELETE CASCADE
4570
    CONSTRAINT borrower_macro_fk FOREIGN KEY ( borrowernumber ) REFERENCES borrowers ( borrowernumber ) ON UPDATE CASCADE ON DELETE CASCADE
4571
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4571
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4572
4572
4573
--
4574
-- Table structure for table import_oaipmh_biblios
4575
--
4576
4577
DROP TABLE IF EXISTS import_oaipmh_biblios;
4578
CREATE TABLE import_oaipmh_biblios (
4579
    id INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
4580
    repository MEDIUMTEXT NOT NULL, -- this is a URL so it needs to be long
4581
    identifier MEDIUMTEXT NOT NULL, -- this is technically a URI
4582
    datestamp datetime NOT NULL, -- this is a UTC timestamp
4583
    deleted TINYINT(1) DEFAULT 0, -- boolean for header status of deleted
4584
    metadata LONGTEXT NOT NULL, -- OAI-PMH encapsulated metadata
4585
    frameworkcode varchar(4) NOT NULL, -- frameworkcode to use when importing
4586
    biblionumber INT(11),
4587
    last_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
4588
    PRIMARY KEY (id),
4589
    KEY biblionumber (biblionumber),
4590
    CONSTRAINT FK_import_oaipmh_biblios_1 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE NO ACTION
4591
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4592
4573
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4593
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4574
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4594
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4575
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4595
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4576
- 

Return to bug 25905