xiongzhu 5 лет назад
Родитель
Сommit
e59beca9dc
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      db/migrate003.sql

+ 6 - 2
db/migrate003.sql

@@ -11,8 +11,12 @@ set contract_room.contract_id = contract.id;
 
 rename table contract_room to contract_room_type;
 
+update contract_room_type
+set store_id = store_info_id;
+
 alter table contract_room_type
-    change store_info_id store_id bigint null;
+    drop column store_info_id;
 
-alter table residence_room_type change store_info_id store_id bigint null;
+alter table residence_room_type
+    change store_info_id store_id bigint null;