fix: multi-tenant phase 2

This commit is contained in:
2024-06-26 10:30:53 +08:00
parent 267904be29
commit f514818e5d
16 changed files with 56 additions and 37 deletions

View File

@@ -131,7 +131,7 @@ for ne_type in ${ne_types}; do
if [ $? = 0 ]; then
echo "done"
fi
SQL="ALTER TABLE ${TABLE_NAME} ADD COLUMN IF NOT EXISTS `tenant_name` varchar(128) NULL AFTER `created_at`;"
SQL="ALTER TABLE ${TABLE_NAME} ADD COLUMN IF NOT EXISTS `tenant_id` varchar(32) NULL DEFAULT NULL AFTER `created_at`;"
echo -n "Alter table ${TABLE_NAME} ..."
mysql -u${USER} -p${PASSWORD} -P ${PORT} --protocol tcp -D ${DBNAME} -e "${SQL}"
if [ $? = 0 ]; then