mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +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:
parent
7d7b2abd02
commit
98d425f1f4
1 changed files with 2 additions and 0 deletions
|
@ -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,"
|
||||
|
|
Loading…
Add table
Reference in a new issue