edgedb / easy-edgedb

An illustrated textbook designed to be a one-stop shop for learning EdgeDB
https://www.edgedb.com/easy-edgedb
69 stars 36 forks source link

Add migration flow #100

Closed Dhghomon closed 1 year ago

Dhghomon commented 1 year ago

This is the second major change to Easy EdgeDB since the PR a month ago that incorporated changes from Devon's massive onboarding feedback, syntax capitalization and various random other things: https://github.com/edgedb/easy-edgedb/pull/96

That first PR was already long enough so intentionally avoided anything that would have cascading effects like a change in one chapter that changes the schema in the next and then the next.

The PR this time adds migration flow, namely all the necessary changes for a reader to use Easy EdgeDB with the migration tools instead of the manual commands before. Back when I first made Easy EdgeDB the migration tools were rougher and I had a Surface Go (!) so even pasting a migration command led to screens and screens of text and if something didn't match...so a lot of the book had some guesswork in what output would show up at any time.

There are also a number of changes where EdgeDB itself has improved since alpha, like enums and dates being able to be made before the unix epoch (important for this book which is set in the 19th century).

There is a lot of outright rewriting sections too (too many to mention here but check the commits) where the original felt weird, unnecessary or just wrong. And those had their own cascading effects down the chain.

Chinese: I attempted to keep it up to date with the English version but very soon saw just how much there was to change to add the migration flow so mostly gave up. Where possible though I harmonized them with the English version.

To keep the PR relatively small(!) I purposely avoided adding new content on some of the neat features (such as Globals), though some like date_duration snuck in pretty easily. And I couldn't resist the temptation to mention the splat operator in the section on the introspect keyword because the output with the double splat is so fantastic and shows just how much there is to see when you use that keyword. But the remainder will be for later.

After this PR is done there are three (four?) major changes planned.