# For all versions, we need to create the Index on Media(StorageId)
# It may fail, but it's not a big problem
-# mysql $* -f <<END-OF-DATA >/dev/null 2> /dev/null
+# mysql $* <<END-OF-DATA >/dev/null 2> /dev/null
# CREATE INDEX media_storageid_idx ON Media (StorageId);
# END-OF-DATA
if [ "$DBVERSION" -eq 12 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
CREATE TABLE RestoreObject (
fi
if [ "$DBVERSION" -eq 13 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE File ADD COLUMN DeltaSeq smallint default 0;
fi
if [ "$DBVERSION" -eq 14 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
INSERT INTO Status (JobStatus,JobStatusLong,Severity) VALUES
fi
if [ "$DBVERSION" -eq 1014 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE Media
fi
if [ "$DBVERSION" -eq 1016 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
CREATE INDEX jobtdate_idx on JobHisto (JobTDate);
ALTER TABLE Snapshot ADD COLUMN JobId INTEGER UNSIGNED DEFAULT 0;
fi
if [ "$DBVERSION" -eq 1017 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
CREATE TABLE FileMedia
(
# We are coming from version 16, so it's already done
if [ "$SKIP1018" = 1 -a "$DBVERSION" -eq 1018 ]; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE File MODIFY FileIndex INTEGER DEFAULT 0;
ALTER TABLE RestoreObject MODIFY FileIndex INTEGER DEFAULT 0;
fi
if [ "$DBVERSION" -eq 1018 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE BaseFiles MODIFY COLUMN BaseId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE Media
if [ "$DBVERSION" -eq 1019 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE Pool ADD COLUMN MaxPoolBytes BIGINT UNSIGNED DEFAULT 0;
ALTER TABLE Job ADD COLUMN PriorJob TINYBLOB;
fi
if [ "$DBVERSION" -eq 1020 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE File
MODIFY FileIndex INTEGER DEFAULT 0;
fi
if [ "$DBVERSION" -eq 1021 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
CREATE TABLE TagJob
fi
if [ "$DBVERSION" -eq 1022 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE FileMedia ADD FileMediaId integer auto_increment primary key;
ALTER TABLE JobHisto MODIFY COLUMN JobId int PRIMARY KEY AUTO_INCREMENT;
fi
if [ "$DBVERSION" -eq 1023 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE Object
ADD ObjectStatus BINARY(1) DEFAULT 'U',
# For all versions, we need to create the Index on Media(StorageId)
# It may fail, but it's not a big problem
-# mysql $* -f <<END-OF-DATA >/dev/null 2> /dev/null
+# mysql $* <<END-OF-DATA >/dev/null 2> /dev/null
# CREATE INDEX media_storageid_idx ON Media (StorageId);
# END-OF-DATA
if [ "$DBVERSION" -eq 12 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
CREATE TABLE RestoreObject (
fi
if [ "$DBVERSION" -eq 13 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE File ADD COLUMN DeltaSeq smallint default 0;
fi
if [ "$DBVERSION" -eq 14 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
INSERT INTO Status (JobStatus,JobStatusLong,Severity) VALUES
fi
if [ "$DBVERSION" -eq 15 ] ; then
- if mysql $* -f <<END-OF-DATA
+ if mysql $* <<END-OF-DATA
USE ${db_name};
ALTER TABLE BaseFiles MODIFY COLUMN BaseId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE Media CHANGE COLUMN VolParts VolType INTEGER UNSIGNED DEFAULT 0;