feat(wishlist): add shared family wishlist with likes

Each recipe appears at most once on the wishlist. Any profile can add,
remove, like, and unlike. Ratings and cooking log stay independent.

Data model: wishlist(recipe_id PK, added_by_profile_id, added_at)
            wishlist_like(recipe_id, profile_id, created_at)

Why: 'das will ich essen' — family members pick candidates, everyone
can +1 to signal agreement, cook decides based on popularity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 17:08:22 +02:00
parent 72019f9cb7
commit 18547a7301
4 changed files with 257 additions and 2 deletions

View File

@@ -30,9 +30,14 @@ describe('db migrations', () => {
it('is idempotent', () => {
const db = openInMemoryForTest();
const countBefore = (
db.prepare('SELECT COUNT(*) AS c FROM schema_migration').get() as { c: number }
).c;
runMigrations(db);
const migs = db.prepare('SELECT COUNT(*) AS c FROM schema_migration').get() as { c: number };
expect(migs.c).toBe(1);
const countAfter = (
db.prepare('SELECT COUNT(*) AS c FROM schema_migration').get() as { c: number }
).c;
expect(countAfter).toBe(countBefore);
});
it('cascades recipe delete to ingredients and steps', () => {