stacks-core
stacks-core copied to clipboard
Fix typo in `nakamoto_tenures` table
Describe the bug
There is a typo in the definition of the nakamoto_tenures
table:
https://github.com/stacks-network/stacks-core/blob/b7f7295775ba8571ed322846367451fc6bf44126/stackslib/src/chainstate/nakamoto/tenure.rs#L132
It didn't cause any problems because it seems that sqlite will default to NUMERIC
type if it can't figure it out. Despite that, this typo should be fixed. Since this is already released with the typo, we might need to be careful about just changing the schema.
@kantai mentioned that https://www.sqlite.org/stricttables.html would have caught this.
Yep -- I think the appropriate thing to do in this case, is to drop the table and recreate it with a schema version number switch. Because no entries in this table exist yet, this is safe.
This should be a good first use case for the STRICT keyword in the recreated table.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.