[autotest] modify invalidates_test_idx fk constraint

The foreign key invalidates_test_idx is causing trouble
in db cleanup. If row1 points to row2 points to row3, they can only
be removed in the order of row3, row2, row1, which often not
the case in the db cleanup. This CL change the fk constraint
from ON DELETE NO ACTION to ON DELETE CASADE, such that
the db will handle the dependency.

TEST=database/migrate.py sync
database/migrate.py sync 101
BUG=None
DEPLOY=migrate

Change-Id: Ic208b87b95ded81612d50f0798aa43d4f611f798
Reviewed-on: https://chromium-review.googlesource.com/275470
Reviewed-by: Dan Shi <dshi@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
1 file changed