sqlmig: corriger le suivi des maj admin

This commit is contained in:
Jephté Clain 2018-05-24 22:53:32 +04:00
parent 4b85c93251
commit bad6c4811a
1 changed files with 6 additions and 0 deletions

6
sqlmig
View File

@ -1125,6 +1125,7 @@ if [ -n "$updatedir" ]; then
setx name=basename "$update"
[ "$dbmode" == devel -o "${name%.devel.sql}" == "$name" ] || continue
[ -z "$updatefile" -o "$updatefile" == "$update" ] || continue
name="${update#$updatedir/}"
mysql_admin_update "$name" "$update" "$updatefile"
done
eend; eclearp
@ -1140,6 +1141,7 @@ if [ -n "$updatedir" ]; then
setx name=basename "$update"
[ "$dbmode" == devel -o "${name%.devel.sql}" == "$name" ] || continue
[ -z "$updatefile" -o "$updatefile" == "$update" ] || continue
name="${update#$updatedir/}"
oracle_admin_update "$name" "$update" "$updatefile"
done
eend; eclearp
@ -1259,8 +1261,10 @@ for dbdir in "${dbdirs[@]}"; do
[ "$dbmode" == devel -o "${name%.devel.sql}" == "$name" ] || continue
[ -z "$updatefile" -o "$updatefile" == "$update" ] || continue
if have_tag admin "$update"; then
[ -n "$updatedir" ] && name="${update#$updatedir/}" || name="${update#$dbdir/}"
mysql_admin_update "$name" "$update" "$updatefile"
else
name="${update#$dbdir/}"
mysql_user_update "$name" "$update" "$dbname" "$updatefile"
fi
done
@ -1324,8 +1328,10 @@ for dbdir in "${dbdirs[@]}"; do
[ "$dbmode" == devel -o "${name%.devel.sql}" == "$name" ] || continue
[ -z "$updatefile" -o "$updatefile" == "$update" ] || continue
if have_tag admin "$update"; then
[ -n "$updatedir" ] && name="${update#$updatedir/}" || name="${update#$dbdir/}"
oracle_admin_update "$name" "$update" "$updatefile"
else
name="${update#$dbdir/}"
oracle_user_update "$name" "$update" "$dbname" "$updatefile"
fi
done