title: How do I make a Parent-Child association where deleting the child will delete the parent, but not vice versa
body: <p>I am currently trying to make two create two tables that have a 1:M association. What I'm trying to achieve is this:</p>
  
  <p><code>Parent deleted? -&gt; Set foreign key in Child to null
  Child deleted? -&gt; Delete parent</code></p>
  
  <p>I've been trying this for quite some time and am not sure if this is actually possible. These are my create table queries (generated by <a href="http://docs.sequelizejs.com/" rel="nofollow noreferrer">sequelize</a>, a sql node.js module)</p>
  
  <p>Parent table:
  <code>CREATE TABLE IF NOT EXISTS `Sets` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `appId` INTEGER NOT NULL, `cardAmount` INTEGER NOT NULL, `foil` TINYINT(1) NOT NULL, `reserved` TINYINT(1) NOT NULL);</code></p>
  
  <p>Child table:
  <code>CREATE TABLE IF NOT EXISTS `Cards` (`assetId` INTEGER PRIMARY KEY, `appId` INTEGER NOT NULL, `foil` TINYINT(1) NOT NULL, `reserved` TINYINT(1) NOT NULL, `name` VARCHAR(255) NOT NULL, `setId` INTEGER REFERENCES `Sets` (`id`) ON DELETE SET NULL ON UPDATE CASCADE);</code></p>
  
  <p>I'm not really sure what to change about them to make it work like I want it to, since the parent table doesn't have a foreign key I dont think its possible to add an ON DELETE. Help is appreciated!!</p>
  
  <p>EDIT: The dialect that im using is SQLite</p>