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

(-)a/Koha/Schema/Result/Deleteditem.pm (-2 / +11 lines)
Lines 265-270 __PACKAGE__->table("deleteditems"); Link Here
265
  is_nullable: 1
265
  is_nullable: 1
266
  size: 32
266
  size: 32
267
267
268
=head2 new
269
270
  accessor: undef
271
  data_type: 'varchar'
272
  is_nullable: 1
273
  size: 32
274
268
=cut
275
=cut
269
276
270
__PACKAGE__->add_columns(
277
__PACKAGE__->add_columns(
Lines 365-370 __PACKAGE__->add_columns( Link Here
365
  { data_type => "varchar", is_nullable => 1, size => 32 },
372
  { data_type => "varchar", is_nullable => 1, size => 32 },
366
  "stocknumber",
373
  "stocknumber",
367
  { data_type => "varchar", is_nullable => 1, size => 32 },
374
  { data_type => "varchar", is_nullable => 1, size => 32 },
375
  "new",
376
  { accessor => undef, data_type => "varchar", is_nullable => 1, size => 32 },
368
);
377
);
369
378
370
=head1 PRIMARY KEY
379
=head1 PRIMARY KEY
Lines 380-387 __PACKAGE__->add_columns( Link Here
380
__PACKAGE__->set_primary_key("itemnumber");
389
__PACKAGE__->set_primary_key("itemnumber");
381
390
382
391
383
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-24 09:58:16
392
# Created by DBIx::Class::Schema::Loader v0.07041 @ 2014-11-05 09:42:42
384
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ru5DyaIlWJcMNAgpZRjOLg
393
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FuMIqaxfqRuclwG/pxrTtA
385
394
386
395
387
# You can replace this text with custom content, and it will be preserved on regeneration
396
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Item.pm (-2 / +11 lines)
Lines 268-273 __PACKAGE__->table("items"); Link Here
268
  is_nullable: 1
268
  is_nullable: 1
269
  size: 32
269
  size: 32
270
270
271
=head2 new
272
273
  accessor: undef
274
  data_type: 'varchar'
275
  is_nullable: 1
276
  size: 32
277
271
=cut
278
=cut
272
279
273
__PACKAGE__->add_columns(
280
__PACKAGE__->add_columns(
Lines 373-378 __PACKAGE__->add_columns( Link Here
373
  { data_type => "varchar", is_nullable => 1, size => 32 },
380
  { data_type => "varchar", is_nullable => 1, size => 32 },
374
  "stocknumber",
381
  "stocknumber",
375
  { data_type => "varchar", is_nullable => 1, size => 32 },
382
  { data_type => "varchar", is_nullable => 1, size => 32 },
383
  "new",
384
  { accessor => undef, data_type => "varchar", is_nullable => 1, size => 32 },
376
);
385
);
377
386
378
=head1 PRIMARY KEY
387
=head1 PRIMARY KEY
Lines 609-616 __PACKAGE__->might_have( Link Here
609
);
618
);
610
619
611
620
612
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-24 09:58:16
621
# Created by DBIx::Class::Schema::Loader v0.07041 @ 2014-11-05 09:42:42
613
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2slVK/FjcRDiYLeufoOFQQ
622
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yCum/5krRX5Yv+qXQJ1QPg
614
623
615
__PACKAGE__->belongs_to(
624
__PACKAGE__->belongs_to(
616
    "biblio",
625
    "biblio",
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 922-927 CREATE TABLE `deleteditems` ( Link Here
922
  `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
922
  `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
923
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
923
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
924
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
924
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
925
  `new` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the toggle_new_status cronjob.
925
  PRIMARY KEY  (`itemnumber`),
926
  PRIMARY KEY  (`itemnumber`),
926
  KEY `delitembarcodeidx` (`barcode`),
927
  KEY `delitembarcodeidx` (`barcode`),
927
  KEY `delitemstocknumberidx` (`stocknumber`),
928
  KEY `delitemstocknumberidx` (`stocknumber`),
Lines 1221-1226 CREATE TABLE `items` ( -- holdings/item information Link Here
1221
  `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
1222
  `enumchron` text default NULL, -- serial enumeration/chronology for the item (MARC21 952$h)
1222
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
1223
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
1223
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
1224
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
1225
  `new` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intended to be managed by the toggle_new_status cronjob.
1224
  PRIMARY KEY  (`itemnumber`),
1226
  PRIMARY KEY  (`itemnumber`),
1225
  UNIQUE KEY `itembarcodeidx` (`barcode`),
1227
  UNIQUE KEY `itembarcodeidx` (`barcode`),
1226
  KEY `itemstocknumberidx` (`stocknumber`),
1228
  KEY `itemstocknumberidx` (`stocknumber`),
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +12 lines)
Lines 8974-8979 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
8974
    SetVersion($DBversion);
8974
    SetVersion($DBversion);
8975
}
8975
}
8976
8976
8977
$DBversion = "3.17.00.XXX";
8978
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8979
    $dbh->do(q{
8980
        ALTER TABLE `items` ADD `new` VARCHAR(32) NULL AFTER `stocknumber`;
8981
    });
8982
    $dbh->do(q{
8983
        ALTER TABLE `deleteditems` ADD `new` VARCHAR(32) NULL AFTER `stocknumber`;
8984
    });
8985
    print "Upgrade to $DBversion done (Bug 11023: Adds field 'new' in items and deleteditems tables)\n";
8986
    SetVersion($DBversion);
8987
}
8988
8977
=head1 FUNCTIONS
8989
=head1 FUNCTIONS
8978
8990
8979
=head2 TableExists($table)
8991
=head2 TableExists($table)
8980
- 

Return to bug 11023