Delete Cascade sqlite3


I have 2 tables

Control and User.

The control have the

Name, user_id.

I want to delete the control when i delete the user.

So, if i delete all users with id = 10 i want to delete all controls with user_id = 10.

Is there a way to do that in the database.

I’m already doing the CONSTRAINT “fk_user_id” FOREIGN KEY (“user_id”) REFERENCES “tbl_user” (“id”) ON DELETE CASCADE, and no luck



		'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',


		                                'PRAGMA foreign_keys = ON',