Day 3 (3/10 Days of React) — Learning Migrations
For day 3, I set out to learn and write migrations for the app. Everything was to go very fine except I hadn’t actually sat down to draw what I wanted the structure of the app to be like (note to self — “Never make this mistake again”).
So, I went along to study how Sequelize sets up and manages the database for a node app. It is does migrations excellently and even somehow manages the model (all of this is still not very clear, but coding will make all of it make sense). I also learnt about Umzug which I haven’t tried or even fully understood. I believe it is supposed to log migrations and manage rollbacks or something like that.
Since I didn’t appropriately plan for yesterday (costing me time), I had to just setup the database packages. I’m using SQLite (since I’d use the same when time for Android and then iOS comes). I could always change the database engine to mysql, postgres or any of the others so it is not a big deal if the need arises. Besides, I have this love for SQLite that I can’t exactly explain 😍
For Day 4, I would definitely have to plan out the app tables and all of that many things, then proceed to write the migrations. I just have to finish that process so I can make up for lost time. From what I understand, Sequelize will manage my database for me as well, so I may never have to worry about how to start calling on them and writing the many methods to actually fetch and process data (I hope).
Over all, it has been a good experience. We had another person join us yesterday so that’s some good news. Ah, the guys on WhatsApp are on 🔥. Despite joining my challenge, there are already doing things bigger than me and now I’m playing catch up 😅. Friday is on Vue (he loves it more) and Somto is already very far (and he’d say “I’m learning React” 🙄).
You could still join us if you want. We haven’t gone very far and we are always supporting each other.
The link to join us. Spread the word…