Delete Cascade sqlite3

Hi,

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

Solved:

	'db'=>array(


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


		'initSQLs'=>array(


		                                'PRAGMA foreign_keys = ON',


		                        ),


		


	),