mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 13:14:21 +01:00
Fix data handling (#540)
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.2
|
||||||
|
- Change the way to migrate data
|
||||||
|
|
||||||
## 1.1
|
## 1.1
|
||||||
- Fix connection issue with 10.3.13
|
- Fix connection issue with 10.3.13
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "MariaDB",
|
"name": "MariaDB",
|
||||||
"version": "1.1",
|
"version": "1.2",
|
||||||
"slug": "mariadb",
|
"slug": "mariadb",
|
||||||
"description": "An SQL database server",
|
"description": "An SQL database server",
|
||||||
"url": "https://home-assistant.io/addons/mariadb/",
|
"url": "https://home-assistant.io/addons/mariadb/",
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ if [ ! -d "$MARIADB_DATA" ]; then
|
|||||||
mysql_install_db --user=root --datadir="$MARIADB_DATA" > /dev/null
|
mysql_install_db --user=root --datadir="$MARIADB_DATA" > /dev/null
|
||||||
else
|
else
|
||||||
echo "[INFO] Use exists mariadb initial system"
|
echo "[INFO] Use exists mariadb initial system"
|
||||||
mysqlcheck --no-defaults --check-upgrade --auto-repair --databases mysql --skip-write-binlog > /dev/null || true
|
|
||||||
mysqlcheck --no-defaults --all-databases --fix-db-names --fix-table-names --skip-write-binlog > /dev/null || true
|
|
||||||
mysqlcheck --no-defaults --check-upgrade --all-databases --auto-repair --skip-write-binlog > /dev/null || true
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start mariadb
|
# Start mariadb
|
||||||
@@ -29,6 +26,11 @@ while ! mysql -e "" 2> /dev/null; do
|
|||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "[INFO] Check data integrity and fix corruptions"
|
||||||
|
mysqlcheck --no-defaults --check-upgrade --auto-repair --databases mysql --skip-write-binlog > /dev/null || true
|
||||||
|
mysqlcheck --no-defaults --all-databases --fix-db-names --fix-table-names --skip-write-binlog > /dev/null || true
|
||||||
|
mysqlcheck --no-defaults --check-upgrade --all-databases --auto-repair --skip-write-binlog > /dev/null || true
|
||||||
|
|
||||||
# Init databases
|
# Init databases
|
||||||
echo "[INFO] Init custom database"
|
echo "[INFO] Init custom database"
|
||||||
for line in $DATABASES; do
|
for line in $DATABASES; do
|
||||||
|
|||||||
Reference in New Issue
Block a user