When indexeddb upgrades the version number, how do I add an index to the old table?

for example, createObjectStore reported an error when upgrading the version number, because the table has already been created, and the index is also created when the table is created
how can I add a new index to the old table when the database version is upgraded?


you need to create a new object repository or delete an object repository from the previous version that is no longer needed. If you need to modify an existing object repository (for example, to modify keyPath), you must first delete the original object repository and then create it with the new settings. (note that this will lose the data in the object repository, and if you need to save this information, you need to read it out and save it elsewhere before the database version is updated.)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea0aef-478d0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea0aef-478d0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?