
aral@mastodon.ar.al ("Aral Balkan") wrote:
I haven’t added an example of how you implement migrations with Kitten’s¹ built-in JSDB database² yet but here’s one that I just used when renaming a field (property) in a table (JavaScript object) from “account” to “data” that illustrates the general granular approach you should take within persisted instances of JavaScript classes.
This is, of course, an advanced use case of the built-in JavaScript database that all Kitten apps have.
Kitten is simple for simple use cases. So check out the Persistence tutorial, for example, to see how easy it is to get started with JSDB in Kitten:
https://kitten.small-web.org/tutorials/persistence/
And see the Database App Modules tutorial for a more advanced usage where you persist instances of JavaScript classes and have full type safety:
https://kitten.small-web.org/tutorials/database-app-modules/
¹ https://kitten.small-web.org
² https://codeberg.org/small-tech/jsdb#Kitten #SmallWeb #SmallTech #web #dev #persistence #JavaScript #database #JavaScriptDatabase #authoring #migrations