dbsrgits/sql-translator — pull request #21 by fgabolde (2012-10-03 15:24:24+00:00)
Title: Support for remaining FK ON UPDATE/ON DELETE actions

Hi,

This patch should add the missing support for ON UPDATE (resp. DELETE) SET NULL, SET DEFAULT and NO ACTION. So far only ON UPDATE CASCADE and ON UPDATE RESTRICT were implemented because they were the only ones matching the grammar (ON UPDATE \w+ did not match actions with spaces).

As a side effect it also restricts ON UPDATE and ON DELETE to only be valid actions as per the SQLite grammar here: http://www.sqlite.org/lang_createtable.html (as before this I assume ON UPDATE STUFF happily parsed to is($constraint->on_update, "STUFF")).