Closed hMsats closed 1 year ago
Thanks for the bug report
Maybe this is relate to this https://github.com/ElementsProject/lightning/issues/6696
I believe this was caused by a migration issue from this commit: https://github.com/ElementsProject/lightning/commit/eacf0b502c28662b515eaec2f3e975ac51423f20#diff-1abcdf1b9d822b30079d6450b790274bdfb7c7fa04baa43ad2d9bd449865d4c9R978
Meaning the alter table query
ALTER TABLE runes ADD last_used_nsec BIGINT DEFAULT NULL
was never run on your database.
Artifacts of running on bleeding edge master 😅. You probably should be able to run the command manually and get up and running but screwing with your DB is risky. Maybe shut it down and back it all up first? Caveat emptor 😬
@vincenzopalazzo as suggested above, executing the line: ALTER TABLE runes ADD last_used_nsec BIGINT DEFAULT NULL
by hand on the database solved the issue. So for some (strange) reason it was never executed during the database update.
@vincenzopalazzo I think I found the reason for this issue in the source code. See my pull request.
The error message and the PR (#6713) do not seem to be related. IMHO, @ddustin suggestion solved your issue and then you found another issue which you resolved with the PR.
No further action is required, so closing this issue now.
@ShahanaFarooqui the issue was caused because a database command was added second-to-last instead of last in the dbmigration
array here: https://github.com/ElementsProject/lightning/commit/eacf0b502c28662b515eaec2f3e975ac51423f20#diff-1abcdf1b9d822b30079d6450b790274bdfb7c7fa04baa43ad2d9bd449865d4c9R978
The result of this is people updating from before this commit to after will never get the ALTER TABLE runes
command and instead will have migrate_runes_idfix
run a second time.
@ShahanaFarooqui the issue was caused because a database command was added second-to-last instead of last in the
dbmigration
array here: eacf0b5#diff-1abcdf1b9d822b30079d6450b790274bdfb7c7fa04baa43ad2d9bd449865d4c9R978The result of this is people updating from before this commit to after will never get the
ALTER TABLE runes
command and instead will havemigrate_runes_idfix
run a second time.
Ohh I remember now. It happened because when I rebased the PR, it merged it in the wrong direction. And fixed that in further commits :)
What is the solution here?
as suggested above, executing the line: ALTER TABLE runes ADD last_used_nsec BIGINT DEFAULT NULL by hand on the database solved the issue.
I really hope it is not this
Issue and Steps to Reproduce
getinfo
outputMaster (a0f4eb9)