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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user