afterschoolstudio / Depot

Structured data editor built inside VS Code
Apache License 2.0
186 stars 19 forks source link

How should column updates be handled? #23

Open kkukshtel opened 3 years ago

kkukshtel commented 3 years ago

This is a bit of an open question to the community. If I (or anyone else) changes the underlying config of a column in depot by adding in or removing a field, how should Depot account for that change in "older" files? I have no intention right now to ever change the data key/type for a given column, but if I add in meta to a column (like right now I'm adding in the ability to set a display type for multi-selects), should Depot auto update any loaded in sheet to the latest version? Or should it keep things as is and not try to change a loaded in file, but have any new columns have the new schema? I could also version the .dpo files so they would stay consistent across a given file, and a user could select a version when creating a new file?

Would love to know what people think here!

kkukshtel commented 3 years ago

With https://github.com/kkukshtel/Depot/commit/b66bf97ff1214858a7596e92f348c8f4d37db8e0 I've added in the ability for users to opt-into new column types for old columns, and any new columns will use new types:

image