-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to update type of column MINVT_WRD_ID_A of oh_medicaldsrin…
…ventory
- Loading branch information
ArnaudFofou
committed
Nov 20, 2024
1 parent
cb20185
commit 987ddae
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
-- Step 1: Drop the foreign key constraint | ||
ALTER TABLE OH_MEDICALDSRINVENTORY | ||
DROP CONSTRAINT oh_medicaldsrinventory_ibfk_2; | ||
|
||
-- Step 2: Change the data type of the foreign key column | ||
ALTER TABLE OH_MEDICALDSRINVENTORY | ||
MODIFY MINVT_WRD_ID_A CHAR(3); | ||
|
||
-- Step 3: Recreate the foreign key constraint | ||
ALTER TABLE OH_MEDICALDSRINVENTORY | ||
ADD CONSTRAINT oh_medicaldsrinventory_ibfk_2 | ||
FOREIGN KEY (MINVT_WRD_ID_A) REFERENCES OH_WARD (WRD_ID_A); |