-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore :: v1.1.2 누락 된 if exists 재추가 #82
Conversation
ALTER TABLE public."member" DROP COLUMN IF EXISTS birthdate; | ||
ALTER TABLE public."member" DROP COLUMN IF EXISTS gender; | ||
ALTER TABLE public."member" ADD COLUMN IF NOT EXISTS age int; | ||
ALTER TABLE public."member" ADD COLUMN IF NOT EXISTS gender int; | ||
|
||
-- 복호화 뷰 생성 | ||
CREATE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The provided code patch includes the following changes:
- The view
member_view
is dropped usingdrop view IF EXISTS member_view;
. This ensures that the view is only dropped if it exists. - Three functions (
member_view_delete_trigger
,member_view_insert_trigger
, andmember_view_update_trigger
) are dropped usingdrop function IF EXISTS <function_name>;
. Once again, this ensures that the functions are only dropped if they exist. - The column
birthdate
in the tablemember
is dropped if it exists usingALTER TABLE public."member" DROP COLUMN IF EXISTS birthdate;
. - The column
gender
in the tablemember
is dropped if it exists usingALTER TABLE public."member" DROP COLUMN IF EXISTS gender;
. - The column
age
is added to themember
table if it doesn't exist usingALTER TABLE public."member" ADD COLUMN IF NOT EXISTS age int;
. - The column
gender
is added to themember
table if it doesn't exist usingALTER TABLE public."member" ADD COLUMN IF NOT EXISTS gender int;
.
Overall, the code appears to handle the dropping of views, functions, and columns gracefully, using appropriate checks for their existence. However, without additional context or knowledge of the specific requirements, it is difficult to provide further improvement suggestions or identify potential bug risks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다~ 감사합니다!
@@ -1,15 +1,17 @@ | |||
-- 복호화 view 삭제 | |||
drop view member_view; | |||
drop view IF EXISTS member_view; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💡 Motivation and Context
여기에 왜 이 PR이 필요했는지, PR을 통해 무엇이 바뀌는지에 대해서 설명해 주세요
🔨 Modified
🌟 More
📋 커밋 전 체크리스트
🤟🏻 PR로 완료된 이슈
closes #80, #81