parent
8525a28f5e
commit
94a0601cf3
@ -0,0 +1,15 @@
|
|||||||
|
USE AM_DB;
|
||||||
|
|
||||||
|
-- Add columns to the IDP table
|
||||||
|
ALTER TABLE IDP
|
||||||
|
ADD IMAGE_URL VARCHAR(1024),
|
||||||
|
UUID CHAR(36);
|
||||||
|
|
||||||
|
-- Add a unique constraint on the UUID column
|
||||||
|
ALTER TABLE IDP
|
||||||
|
ADD CONSTRAINT UQ_IDP_UUID UNIQUE (UUID);
|
||||||
|
|
||||||
|
-- Update the UUID column with unique values
|
||||||
|
UPDATE IDP
|
||||||
|
SET UUID = NEWID();
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
timestamp() {
|
||||||
|
date +"%T"
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "$(timestamp) : =====Starting DB Migrations====="
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
DB_USER=sa
|
||||||
|
DB_PASS=Cpbac7690#
|
||||||
|
#DB_HOST=
|
||||||
|
|
||||||
|
CURRENT_DIRECTORY=$(pwd)
|
||||||
|
|
||||||
|
APIM_IDP_SCRIPT="${CURRENT_DIRECTORY}/apim/idp-migration.sql"
|
||||||
|
#REG_SCRIPT="${CURRENT_DIRECTORY}/REG/REG-migration.sql"
|
||||||
|
#UM_SCRIPT="${CURRENT_DIRECTORY}/UM/um-migration.sql"
|
||||||
|
CDM_SCRIPT="${CURRENT_DIRECTORY}/cdm/cdm382to530.sql"
|
||||||
|
APPM_SCRIPT="${CURRENT_DIRECTORY}/appm/appm382to530.sql"
|
||||||
|
|
||||||
|
echo "$(timestamp) : Migrating AM_DB IDP tables "
|
||||||
|
echo ""
|
||||||
|
sqlcmd -U $DB_USER -P$DB_PASS -i "$APIM_IDP_SCRIPT"
|
||||||
|
#echo "$(timestamp) : Migrating REG_DB tables"
|
||||||
|
#echo ""
|
||||||
|
#mysql -h $DB_HOST -u $DB_USER -p$DB_PASS < "$REG_SCRIPT"
|
||||||
|
#echo "$(timestamp) : Migrating UM_DB tables"
|
||||||
|
#echo ""
|
||||||
|
#mysql -h $DB_HOST -u $DB_USER -p$DB_PASS < "$UM_SCRIPT"
|
||||||
|
echo "$(timestamp) : Migrating CDM tables"
|
||||||
|
echo ""
|
||||||
|
sqlcmd -U $DB_USER -P$DB_PASS -i "$CDM_SCRIPT"
|
||||||
|
echo "$(timestamp) : Migrating APPM tables"
|
||||||
|
echo ""
|
||||||
|
sqlcmd -U $DB_USER -P$DB_PASS -i "$APPM_SCRIPT"
|
||||||
|
|
||||||
|
echo "$(timestamp) : =====DB Migration Completed====="
|
||||||
|
echo ""
|
||||||
|
|
Loading…
Reference in new issue