diff --git a/wallet/db.c b/wallet/db.c index 965feee1b..926352c99 100644 --- a/wallet/db.c +++ b/wallet/db.c @@ -55,6 +55,13 @@ static struct migration dbmigrations[] = { ", PRIMARY KEY (shachain_id, pos)" ");"), NULL}, + {SQL("CREATE TABLE peers (" + " id INTEGER" + ", node_id BLOB UNIQUE" /* pubkey */ + ", address TEXT" + ", PRIMARY KEY (id)" + ");"), + NULL}, {SQL("CREATE TABLE channels (" " id INTEGER," /* chan->id */ " peer_id INTEGER REFERENCES peers(id) ON DELETE CASCADE," @@ -97,13 +104,6 @@ static struct migration dbmigrations[] = { " PRIMARY KEY (id)" ");"), NULL}, - {SQL("CREATE TABLE peers (" - " id INTEGER" - ", node_id BLOB UNIQUE" /* pubkey */ - ", address TEXT" - ", PRIMARY KEY (id)" - ");"), - NULL}, {SQL("CREATE TABLE channel_configs (" " id INTEGER," " dust_limit_satoshis INTEGER,"