[sqlite] On delete cascade & create trigger order?

2015-07-15 Thread Daniel Polski
In my little test below, both the "ON DELETE CASCADE" in table_2 and the (later created) delete_trigger_2 are about to execute removal when a row in table_1 is removed. The table_3 also has the "ON DELETE CASCADE", but it doesn't yet have any content when removing the row in table_1 so it's init

[sqlite] On delete cascade & create trigger order?

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 2:07pm, Daniel Polski wrote: > Or if there is a more elegant solution I haven't thought about? I would suggest here that you rethink your reason for needing three tables table_1, table_2 and table_3. It looks more like you need only one table here, with 'id', 'starttime' a