feat(website): relationship-diagram cast on the relationships page

Third earmarked cast: declare a 1:n relationship, then `show relationship`
draws the two-table connector diagram — showcases the V1 relationship
visualization with motion a still block can't. Convert the relationships
reference page to .mdx and embed it above the syntax (the static diagrams
below remain the exact reference).

Recorded via `pnpm casts`; build clean (25 pages).
This commit is contained in:
claude@clouddev1
2026-06-10 14:13:14 +00:00
parent a8f84c9d17
commit bb7887ea82
3 changed files with 401 additions and 0 deletions
@@ -5,11 +5,15 @@ sidebar:
order: 4
---
import Demo from '../../../components/Demo.astro';
A relationship is a foreign key linking a **child** table to a **parent**'s
primary key. In the [example library](/getting-started/example-library/) each
book is written by one author, so `books` (the child) points at `authors` (the
parent):
<Demo src="/casts/relationship-diagram.cast" title="Declare a 1:n relationship, then draw it with show relationship." />
```rdbms
add 1:n relationship as books_author from authors.author_id to books.author_id on delete cascade
```