App Update with new Rows/Columns In Table

Just wanted to know how adding extra rows or columns to a table will effect the existing data in the table on an App Update?

Just say I had something like this:

Level | Score
--------------
1
| 100
2
| 130
3
| 40
4
| 20
5
| 50

And i proceed to add an extra column to that table on an app update, just say stars, will the data then look like this?

Level | Score | Stars
--------------------
1
|
100
| 0
2
|
130
| 0
3
|
40
| 0
4
|
20
| 0
5
|
50
| 0

Comments

  • ImpactBlueStudiosImpactBlueStudios Member Posts: 53
    Bump for the pros to answer
  • ericzingelerericzingeler Member Posts: 334
    If the table is being saved in the prior version by the save table behavior, then changing the structure is a no go; if not, make any changes you want.
  • ImpactBlueStudiosImpactBlueStudios Member Posts: 53
    So the way I've chosen to approach this was to separate tables into writable and readonly tables.

    Readonly tables are tables which contain game and level configurations. These are tables which never get written to, and thus are overwritten on an App Update, and are great for tweaking game balance, item costs etc...

    Writable tables store user data such as settings and scores. Once the Save Table call has been made they are not overwritten by App Updates. This is fine as you dont want your user data being overwritten.

    The only structural changes you can make to a writable table is adding more rows, and this can be done using a "Table Upgrade" actor, which will take a look at the existing table of a previous version and make the necessary changes to update the table structure and its default values to the current version of the app.

    Hope this helps those who are figuring out maintaining table data consistency between app updates.
  • joe_williamsjoe_williams Member, PRO Posts: 50
    This is so helpful. Nice to be able to catch possible headaches early. Thanks for sharing your progress!
Sign In or Register to comment.