Skip to content

Commit

Permalink
fix: sql cannot upgrade (#1570)
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
zzzhangqi authored Nov 29, 2024
1 parent d1b90ca commit 21cb9c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function init_database() {
exit 1
fi
echo -e "${GREEN}INFO: Database initialization completed${NC}"
}

function init_region() {
init_database
# Initialize default region data
if [ "${DB_TYPE}" == "mysql" ]; then
if ! (python default_region.py 2> /dev/null); then
Expand All @@ -72,6 +75,8 @@ elif [ "$1" = "version" ]; then
echo "${RELEASE_DESC}"
else
if (database_empty); then
init_region
else
init_database
fi
# python upgrade.py
Expand Down

0 comments on commit 21cb9c1

Please sign in to comment.