···8686 - Add new optional fields
8787 - Update descriptions
8888 - Add new `knownValues` (don't remove old ones)
8989- - Increment patch version in documentation
8989+ - Document version with timestamp (use `date +%s` to get Unix timestamp)
9090+ - Note in changelog: `// Updated: 1735862400 (2026-01-02)`
909191922. **Breaking Changes** (avoid if possible):
9293 - Create new lexicon with new NSID (e.g., `org.stormlightlabs.malfestio.cardV2`)
+20-16
lexicons/org/stormlightlabs/malfestio/card.json
···1515 "format": "at-uri",
1616 "description": "Reference to the deck this card belongs to."
1717 },
1818- "front": {
1919- "type": "string",
2020- "format": "markdown",
2121- "maxLength": 10000,
2222- "description": "Content on the front of the card."
2323- },
2424- "back": {
2525- "type": "string",
2626- "format": "markdown",
2727- "maxLength": 10000,
2828- "description": "Content on the back of the card."
2929- },
1818+ "front": { "type": "string", "maxLength": 10000, "description": "Content on the front of the card." },
1919+ "back": { "type": "string", "maxLength": 10000, "description": "Content on the back of the card." },
3020 "cardType": {
3121 "type": "string",
2222+ "maxLength": 100,
3223 "knownValues": ["basic", "cloze"],
3324 "default": "basic",
3425 "description": "Type of the card (e.g., basic or cloze deletion)."
3526 },
3627 "hints": {
3728 "type": "array",
3838- "items": { "type": "string" },
2929+ "items": { "type": "string", "maxLength": 1000 },
3930 "description": "Optional hints to display before revealing the answer."
4031 },
4132 "media": {
···4536 "required": ["uri", "kind"],
4637 "properties": {
4738 "uri": { "type": "string", "format": "uri" },
4848- "kind": { "type": "string", "knownValues": ["image", "audio"] },
4949- "alt": { "type": "string" }
3939+ "kind": { "type": "string", "maxLength": 100, "knownValues": ["image", "audio"] },
4040+ "alt": { "type": "string", "maxLength": 1000 }
5041 }
5142 },
5243 "description": "Multimedia attachments for the card."
5344 },
5454- "createdAt": { "type": "string", "format": "datetime" }
4545+ "visibility": {
4646+ "type": "string",
4747+ "maxLength": 100,
4848+ "knownValues": ["private", "unlisted", "public"],
4949+ "default": "public",
5050+ "description": "Visibility setting for the card."
5151+ },
5252+ "language": {
5353+ "type": "string",
5454+ "maxLength": 20,
5555+ "description": "Language code for the card content (e.g., 'en', 'es', 'fr')."
5656+ },
5757+ "createdAt": { "type": "string", "format": "datetime" },
5858+ "updatedAt": { "type": "string", "format": "datetime", "description": "Timestamp of last update." }
5559 }
5660 }
5761 }
···1212 "properties": {
1313 "subjectRef": { "type": "string", "format": "at-uri", "description": "The root subject being commented on." },
1414 "replyTo": { "type": "string", "format": "at-uri", "description": "The parent comment if this is a reply." },
1515- "body": { "type": "string", "format": "markdown", "maxLength": 5000, "description": "The comment text." },
1515+ "body": { "type": "string", "maxLength": 5000, "description": "The comment text." },
1616 "createdAt": { "type": "string", "format": "datetime" }
1717 }
1818 }
+28
migrations/013_2026_01_02_add_lexicon_fields.sql
···11+-- Migration: Add language, visibility, updatedAt for lexicon consistency
22+-- Date: 2026-01-02
33+-- Description: Adds optional fields to match lexicon schema updates
44+55+-- Local tables: Add language to all content types
66+ALTER TABLE decks ADD COLUMN IF NOT EXISTS language TEXT;
77+ALTER TABLE cards ADD COLUMN IF NOT EXISTS language TEXT;
88+ALTER TABLE notes ADD COLUMN IF NOT EXISTS language TEXT;
99+1010+-- Local tables: Add visibility to cards (decks and notes already have it)
1111+ALTER TABLE cards ADD COLUMN IF NOT EXISTS visibility JSONB;
1212+1313+-- Indexed tables: Add visibility, updatedAt, language for remote records
1414+ALTER TABLE indexed_decks ADD COLUMN IF NOT EXISTS visibility TEXT;
1515+ALTER TABLE indexed_decks ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ;
1616+ALTER TABLE indexed_decks ADD COLUMN IF NOT EXISTS language TEXT;
1717+1818+ALTER TABLE indexed_cards ADD COLUMN IF NOT EXISTS visibility TEXT;
1919+ALTER TABLE indexed_cards ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ;
2020+ALTER TABLE indexed_cards ADD COLUMN IF NOT EXISTS language TEXT;
2121+2222+ALTER TABLE indexed_notes ADD COLUMN IF NOT EXISTS updated_at TIMESTAMPTZ;
2323+ALTER TABLE indexed_notes ADD COLUMN IF NOT EXISTS language TEXT;
2424+2525+-- Add indexes for common visibility queries
2626+CREATE INDEX IF NOT EXISTS idx_cards_visibility ON cards USING GIN(visibility);
2727+CREATE INDEX IF NOT EXISTS idx_indexed_decks_visibility ON indexed_decks(visibility);
2828+CREATE INDEX IF NOT EXISTS idx_indexed_cards_visibility ON indexed_cards(visibility);