mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-10 08:34:19 +01:00
wallet: add comment on db noting that ON DELETE CASCADE is never used.
We actually have an assertion that there are no channels remaining when we delete peers, so this is confusing! Actually removing the constraint is db-specific and deeply non-trivial. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -96,6 +96,8 @@ static struct migration dbmigrations[] = {
|
||||
NULL},
|
||||
{SQL("CREATE TABLE channels ("
|
||||
" id BIGSERIAL," /* chan->id */
|
||||
/* FIXME: We deliberately never delete a peer with channels, so this constraint is
|
||||
* unnecessary! */
|
||||
" peer_id BIGINT REFERENCES peers(id) ON DELETE CASCADE,"
|
||||
" short_channel_id TEXT,"
|
||||
" channel_config_local BIGINT,"
|
||||
|
||||
Reference in New Issue
Block a user