# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
-$VERSION = "18.06.00.040";
+$VERSION = "18.06.00.041";
sub version {
return $VERSION;
is_nullable: 1
size: 20
+=head2 price_paid
+
+ data_type: 'varchar'
+ is_nullable: 1
+ size: 20
+
=head2 notesopac
data_type: 'mediumtext'
{ data_type => "varchar", is_nullable => 1, size => 500 },
"cost",
{ data_type => "varchar", is_nullable => 1, size => 20 },
+ "price_paid",
+ { data_type => "varchar", is_nullable => 1, size => 20 },
"notesopac",
{ data_type => "mediumtext", is_nullable => 1 },
"notesstaff",
);
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rh8DSs3xj3KRmyd7WNGDAg
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-01 02:46:41
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MMKr4JAAAsNnFcQn9SPTcw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
data_type: 'mediumtext'
is_nullable: 0
+=head2 readonly
+
+ data_type: 'tinyint'
+ default_value: 1
+ is_nullable: 0
+
=cut
__PACKAGE__->add_columns(
{ data_type => "varchar", is_nullable => 0, size => 200 },
"value",
{ data_type => "mediumtext", is_nullable => 0 },
+ "readonly",
+ { data_type => "tinyint", default_value => 1, is_nullable => 0 },
);
=head1 PRIMARY KEY
);
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X9SxZP1PGXTwDJ6lUkx8Fg
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2018-05-17 09:17:53
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sFY1giVMz5AkXCPidhyGjw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
+++ /dev/null
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-
- if( !column_exists( 'illrequests', 'price_paid' ) ) {
- $dbh->do( "ALTER TABLE illrequests ADD COLUMN price_paid varchar(20) DEFAULT NULL AFTER 'cost'" );
- }
-
- SetVersion( $DBversion );
- print "Upgrade to $DBversion done (Bug 20772 - Add illrequest.price_paid column)\n";
-}
+++ /dev/null
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-
- if( !column_exists( 'illrequestattributes', 'readonly' ) ) {
- $dbh->do( "ALTER TABLE illrequestattributes ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1 AFTER 'value'" );
- $dbh->do( "UPDATE illrequestattributes SET readonly = 1" );
- }
-
- SetVersion( $DBversion );
- print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly column)\n";
-}
SetVersion( $DBversion );
}
+$DBversion = '18.06.00.041';
+if( CheckVersion( $DBversion ) ) {
+
+ if( !column_exists( 'illrequests', 'price_paid' ) ) {
+ $dbh->do(q{
+ ALTER TABLE illrequests
+ ADD COLUMN price_paid varchar(20) DEFAULT NULL
+ AFTER cost
+ });
+ }
+
+ if( !column_exists( 'illrequestattributes', 'readonly' ) ) {
+ $dbh->do(q{
+ ALTER TABLE illrequestattributes
+ ADD COLUMN readonly tinyint(1) NOT NULL DEFAULT 1
+ AFTER value
+ });
+ $dbh->do(q{
+ UPDATE illrequestattributes SET readonly = 1
+ });
+ }
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 20772 - Add illrequestattributes.readonly and illrequest.price_paid columns)\n";
+}
+
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.