{ "format_version": 1, "id": "screenplay_draft", "name": "Draft", "plural": "Drafts", "picture": null, "builtin": true, "delete": false, "engine": "screenplay", "columns": [ { "key": "screenplay_id", "name": "Screenplay", "type": "link", "link_to": "screenplay", "readonly": true }, { "key": "name", "name": "Draft", "type": "text", "readonly": true }, { "key": "created_at", "name": "Frozen", "type": "date", "readonly": true }, { "key": "script", "name": "Script", "type": "longtext", "readonly": true } ], "title": "name", "date": "created_at", "project": null, "order": null, "slip": { "title": "name", "subtitle": null, "trailing": "created_at", "photo": null, "toggle": null }, "tile": { "face": "slip-list" }, "page": [ { "heading": null, "columns": [ "name" ] }, { "heading": null, "columns": [ "screenplay_id", "created_at" ], "role": "facts" }, { "heading": null, "columns": [ "script" ], "role": "main" } ], "page_parts": ["title", "facts", "script", "grid"], "sort": { "column": "created_at", "descending": true }, "instructions": "A draft is a frozen copy of a screenplay's scenes, kept under a name. It is read-only: the script is the scenes as they stood when it was frozen, assembled as Fountain by the engine." , "tables": [ { "name": "cotton_screenplay_drafts", "columns": [ { "name": "id", "type": "TEXT", "default": null, "nullable": true, "primary_key": true, "declaration": "\n id TEXT PRIMARY KEY", "position": 0 }, { "name": "workspace_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n workspace_id TEXT NOT NULL", "position": 1 }, { "name": "screenplay_id", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n screenplay_id TEXT NOT NULL", "position": 2 }, { "name": "name", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n name TEXT NOT NULL", "position": 3 }, { "name": "created_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n created_at TEXT NOT NULL", "position": 4 }, { "name": "updated_at", "type": "TEXT", "default": null, "nullable": false, "primary_key": false, "declaration": "\n updated_at TEXT NOT NULL", "position": 5 }, { "name": "_hlc", "type": "TEXT", "default": "''", "nullable": false, "primary_key": false, "declaration": "\n _hlc TEXT NOT NULL DEFAULT ''", "position": 6 }, { "name": "_born", "type": "TEXT", "default": null, "nullable": true, "primary_key": false, "declaration": "\n _born TEXT", "position": 7 } ], "constraints": [ { "declaration": "\n CHECK (length(trim(name)) > 0)", "position": 8 }, { "declaration": "\n FOREIGN KEY (workspace_id) REFERENCES cotton_workspaces(id) ON DELETE CASCADE", "position": 9 }, { "declaration": "\n FOREIGN KEY (screenplay_id) REFERENCES cotton_screenplays(id)\n ", "position": 10 } ], "prefix": "CREATE TABLE cotton_screenplay_drafts (", "suffix": ")", "indexes": [ "CREATE INDEX idx_cotton_screenplay_drafts_screenplay ON cotton_screenplay_drafts (screenplay_id, created_at)", "CREATE INDEX IF NOT EXISTS idx_cotton_screenplay_drafts_author ON cotton_screenplay_drafts (substr(_hlc, 20), _hlc)" ], "full_text": [], "triggers": [] } ] }