Skip to content

Commit 5e7755a

Browse files
authored
핫픽스: 배송 관련 필드 타입 수정 (#50)
* shipping_addresses 테이블 문자셋을 utf8mb4 로 변경 * ship_info.user_memo 필드 타입을 Text 로 변경
1 parent 994b370 commit 5e7755a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class ChangeTextForUserMemo < ActiveRecord::Migration[6.0]
2+
def change
3+
change_column :ship_infos, :user_memo, :text
4+
end
5+
end
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class ChangeUtf8mb4ToShippingAddresses < ActiveRecord::Migration[6.0]
2+
def up
3+
execute "ALTER TABLE shipping_addresses CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
4+
change_column :shipping_addresses, :loc_detail, :text
5+
end
6+
7+
def down
8+
execute "ALTER TABLE shipping_addresses CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci"
9+
change_column :shipping_addresses, :loc_detail, :text
10+
end
11+
end

0 commit comments

Comments
 (0)