Bug 35616: Add source field to tickets table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2023-12-20 14:42:20 +00:00 committed by Katrin Fischer
parent df1f5da673
commit df2a432c65
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
use Modern::Perl;
return {
bug_number => "35616",
description => "Add source column to tickets table",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
unless ( column_exists( 'tickets', 'source' ) ) {
$dbh->do(
"ALTER TABLE `tickets` ADD COLUMN `source` enum('catalog') NOT NULL DEFAULT 'catalog' COMMENT 'source of ticket' AFTER `id`"
);
say $out "Added column 'tickets.source'";
}
},
};

View File

@ -6304,6 +6304,7 @@ DROP TABLE IF EXISTS `tickets`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tickets` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`source` enum('catalog') NOT NULL DEFAULT 'catalog' COMMENT 'source of ticket',
`reporter_id` int(11) NOT NULL DEFAULT 0 COMMENT 'id of the patron who reported the ticket',
`reported_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'date and time this ticket was reported',
`title` text NOT NULL COMMENT 'ticket title',