We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbb990c commit 510c7e0Copy full SHA for 510c7e0
SUMMARY.md
@@ -10,6 +10,7 @@
10
* [什麼是 Polymorphic Association](poly.md)
11
* [Model.find 和 Model.find_by](find.md)
12
* [N+1 Query](nplusone.md)
13
+* [為什麼要有 Migration 檔案](migration.md)
14
* [如何用單一 action 套用 /beer/(beer\_type) 這種 route](beer_type.md)
15
* [如何讓 Person model 可以指定另一個 person 為 parent](person.md)
16
* [CSRF 是什麼](csrf.md)
migration.md
@@ -0,0 +1,5 @@
1
+# 為什麼要有 Migration 檔案
2
+
3
+Migration 檔案的用意在於,讓每一次資料庫修改都能夠被記錄進版本控制。以防止多人協作或開發 / 測試 / 正式環境資料庫 schema 的不一致。
4
5
+而另一個較不為人知的優點是,Migration 背後針對不同類型的資料庫 ( 比方 MySQL vs PostgreSQL ) 可以進行相同的處理,減少開發者考慮在 A DB 和 B DB 進行資料庫操作的語法差異。
0 commit comments