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

(-)a/installer/data/mysql/kohastructure.sql (+18 lines)
Lines 3402-3407 CREATE TABLE IF NOT EXISTS marc_modification_template_actions ( Link Here
3402
  CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE
3402
  CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE
3403
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
3403
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
3404
3404
3405
--
3406
-- Table structure for table `misc_files`
3407
--
3408
3409
CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to records from various tables
3410
  `file_id` int(11) NOT NULL AUTO_INCREMENT, -- unique id for the file record
3411
  `table_tag` varchar(255) NOT NULL, -- usually table name, or arbitrary unique tag
3412
  `record_id` int(11) NOT NULL, -- record id from the table this file is associated to
3413
  `file_name` varchar(255) NOT NULL, -- file name
3414
  `file_type` varchar(255) NOT NULL, -- MIME type of the file
3415
  `file_description` varchar(255) DEFAULT NULL, -- description given to the file
3416
  `file_content` longblob NOT NULL, -- file content
3417
  `date_uploaded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- date and time the file was added
3418
  PRIMARY KEY (`file_id`),
3419
  KEY `table_tag` (`table_tag`),
3420
  KEY `record_id` (`record_id`)
3421
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
3422
3405
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
3423
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
3406
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
3424
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
3407
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
3425
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 1-5 Link Here
1
INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
1
INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
2
('AcqCreateItem','ordering','ordering|receiving|cataloguing','Define when the item is created : when ordering, when receiving, or in cataloguing module','Choice'),
2
('AcqCreateItem','ordering','ordering|receiving|cataloguing','Define when the item is created : when ordering, when receiving, or in cataloguing module','Choice'),
3
('AcqEnableFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to invoice records.','YesNo'),
3
('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'),
4
('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'),
4
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
5
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
5
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
6
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (+22 lines)
Lines 8465-8470 if ( CheckVersion($DBversion) ) { Link Here
8465
    SetVersion($DBversion);
8465
    SetVersion($DBversion);
8466
}
8466
}
8467
8467
8468
$DBversion = "3.15.00.XXX";
8469
if (CheckVersion($DBversion)) {
8470
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES('AcqEnableFiles','0','If enabled, allows librarians to upload and attach arbitrary files to invoice records.','YesNo')");
8471
    $dbh->do("
8472
CREATE TABLE IF NOT EXISTS `misc_files` (
8473
  `file_id` int(11) NOT NULL AUTO_INCREMENT,
8474
  `table_tag` varchar(255) NOT NULL,
8475
  `record_id` int(11) NOT NULL,
8476
  `file_name` varchar(255) NOT NULL,
8477
  `file_type` varchar(255) NOT NULL,
8478
  `file_description` varchar(255) DEFAULT NULL,
8479
  `file_content` longblob NOT NULL, -- file content
8480
  `date_uploaded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
8481
  PRIMARY KEY (`file_id`),
8482
  KEY `table_tag` (`table_tag`),
8483
  KEY `record_id` (`record_id`)
8484
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
8485
    ");
8486
    print "Upgrade to $DBversion done (Bug 3050 - Add an option to upload scanned invoices)\n";
8487
    SetVersion($DBversion);
8488
}
8489
8468
=head1 FUNCTIONS
8490
=head1 FUNCTIONS
8469
8491
8470
=head2 TableExists($table)
8492
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +6 lines)
Lines 46-51 Acquisitions: Link Here
46
            - Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar").
46
            - Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar").
47
            - pref: AcqItemSetSubfieldsWhenReceived
47
            - pref: AcqItemSetSubfieldsWhenReceived
48
        -
48
        -
49
            - pref: AcqEnableFiles
50
              choices:
51
                  yes: Do
52
                  no: "Don't"
53
            - enable the ability to upload and attach arbitrary files to invoices.
54
        -
49
            - Set the mapping values for a new order line created from a MARC record in a staged file.
55
            - Set the mapping values for a new order line created from a MARC record in a staged file.
50
            - pref: MarcFieldsToOrder
56
            - pref: MarcFieldsToOrder
51
              type: textarea
57
              type: textarea
52
- 

Return to bug 3050