how does indexeddb add or remove indexes from old tables when it is updated?
looked up a lot of information, but only one sentence was mentioned about this piece: it can only be modified in onupgradeneeded. But no one said how to modify it. In
onupgradeneeded, you don"t need a transaction to create a new table, you can just createObjectStore it, and the returned objects can continue to create indexes.
but to get the database that has been created, you need to use a transaction, but in onupgradeneeded, the transaction is invalid, the database version is being upgraded, and an error is reported.
then it starts an endless loop. You can"t get the old table when you upgrade, and you can"t add indexes when you can get the table after the upgrade. So this index is disposable? You can"t move after you"ve created it?