Add script 'correct-cloud-database-row-format.sh'.
This commit is contained in:
parent
4abff5e4fa
commit
00cce38bf1
14
correct-cloud-database-row-format.sh
Executable file
14
correct-cloud-database-row-format.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#"/usr/bin/env bash
|
||||||
|
|
||||||
|
read -p "Enter Database Name: " DB_NAME
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
mysql -e "
|
||||||
|
SELECT CONCAT('ALTER TABLE \`', TABLE_NAME, '\` ROW_FORMAT=DYNAMIC;')
|
||||||
|
FROM INFORMATION_SCHEMA.TABLES
|
||||||
|
WHERE TABLE_SCHEMA = '$DB_NAME'
|
||||||
|
AND ENGINE = 'InnoDB';
|
||||||
|
" -B -N | while read -r sql; do
|
||||||
|
mysql -e "$sql" "$DB_NAME"
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user