Skip to content

Commit

Permalink
Merge pull request #228 from gunsight1/hotfix_modify_v109_query
Browse files Browse the repository at this point in the history
* 테이블 컬럼 추가시 존재여부를 판단 한 후 수행하도록 PLSQL로 작성
  • Loading branch information
gunsight1 authored Feb 29, 2024
2 parents 6f3760d + 8b65787 commit 0b97e8b
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
ALTER TABLE auth
ADD COLUMN client_ip varchar;
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM information_schema.columns
WHERE table_name = 'auth'
AND column_name = 'client_ip'
) THEN
ALTER TABLE auth ADD COLUMN client_ip VARCHAR;
END IF;
END $$;

0 comments on commit 0b97e8b

Please sign in to comment.