{
  "version": "6",
  "dialect": "sqlite",
  "id": "e00593c7-b5bd-4617-8a60-880d47b928a4",
  "prevId": "36b52a1d-9075-4d79-9718-4b82d91b6c1d",
  "tables": {
    "assumption": {
      "name": "assumption",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": true
        },
        "project_id": {
          "name": "project_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "assumption_project_id_project_id_fk": {
          "name": "assumption_project_id_project_id_fk",
          "tableFrom": "assumption",
          "tableTo": "project",
          "columnsFrom": [
            "project_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "assumption_parent_assumption": {
      "name": "assumption_parent_assumption",
      "columns": {
        "assumption_id": {
          "name": "assumption_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "parent_assumption_id": {
          "name": "parent_assumption_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "assumption_parent_assumption_assumption_id_assumption_id_fk": {
          "name": "assumption_parent_assumption_assumption_id_assumption_id_fk",
          "tableFrom": "assumption_parent_assumption",
          "tableTo": "assumption",
          "columnsFrom": [
            "assumption_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "assumption_parent_assumption_parent_assumption_id_assumption_id_fk": {
          "name": "assumption_parent_assumption_parent_assumption_id_assumption_id_fk",
          "tableFrom": "assumption_parent_assumption",
          "tableTo": "assumption",
          "columnsFrom": [
            "parent_assumption_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "assumption_parent_assumption_assumption_id_parent_assumption_id_pk": {
          "columns": [
            "assumption_id",
            "parent_assumption_id"
          ],
          "name": "assumption_parent_assumption_assumption_id_parent_assumption_id_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "criterion": {
      "name": "criterion",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": true
        },
        "project_id": {
          "name": "project_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "requirement_id": {
          "name": "requirement_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "reviewed_at": {
          "name": "reviewed_at",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "criterion_project_id_project_id_fk": {
          "name": "criterion_project_id_project_id_fk",
          "tableFrom": "criterion",
          "tableTo": "project",
          "columnsFrom": [
            "project_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "criterion_requirement_id_requirement_id_fk": {
          "name": "criterion_requirement_id_requirement_id_fk",
          "tableFrom": "criterion",
          "tableTo": "requirement",
          "columnsFrom": [
            "requirement_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "decision": {
      "name": "decision",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": true
        },
        "project_id": {
          "name": "project_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "rationale": {
          "name": "rationale",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "decision_project_id_project_id_fk": {
          "name": "decision_project_id_project_id_fk",
          "tableFrom": "decision",
          "tableTo": "project",
          "columnsFrom": [
            "project_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "decision_parent_assumption": {
      "name": "decision_parent_assumption",
      "columns": {
        "decision_id": {
          "name": "decision_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "parent_assumption_id": {
          "name": "parent_assumption_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "decision_parent_assumption_decision_id_decision_id_fk": {
          "name": "decision_parent_assumption_decision_id_decision_id_fk",
          "tableFrom": "decision_parent_assumption",
          "tableTo": "decision",
          "columnsFrom": [
            "decision_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "decision_parent_assumption_parent_assumption_id_assumption_id_fk": {
          "name": "decision_parent_assumption_parent_assumption_id_assumption_id_fk",
          "tableFrom": "decision_parent_assumption",
          "tableTo": "assumption",
          "columnsFrom": [
            "parent_assumption_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "decision_parent_assumption_decision_id_parent_assumption_id_pk": {
          "columns": [
            "decision_id",
            "parent_assumption_id"
          ],
          "name": "decision_parent_assumption_decision_id_parent_assumption_id_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "decision_parent_decision": {
      "name": "decision_parent_decision",
      "columns": {
        "decision_id": {
          "name": "decision_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "parent_decision_id": {
          "name": "parent_decision_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "decision_parent_decision_decision_id_decision_id_fk": {
          "name": "decision_parent_decision_decision_id_decision_id_fk",
          "tableFrom": "decision_parent_decision",
          "tableTo": "decision",
          "columnsFrom": [
            "decision_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "decision_parent_decision_parent_decision_id_decision_id_fk": {
          "name": "decision_parent_decision_parent_decision_id_decision_id_fk",
          "tableFrom": "decision_parent_decision",
          "tableTo": "decision",
          "columnsFrom": [
            "parent_decision_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "decision_parent_decision_decision_id_parent_decision_id_pk": {
          "columns": [
            "decision_id",
            "parent_decision_id"
          ],
          "name": "decision_parent_decision_decision_id_parent_decision_id_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "option": {
      "name": "option",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": true
        },
        "turn_id": {
          "name": "turn_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "is_recommended": {
          "name": "is_recommended",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "is_selected": {
          "name": "is_selected",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        }
      },
      "indexes": {
        "option_turn_position_unique": {
          "name": "option_turn_position_unique",
          "columns": [
            "turn_id",
            "position"
          ],
          "isUnique": true
        }
      },
      "foreignKeys": {
        "option_turn_id_turn_id_fk": {
          "name": "option_turn_id_turn_id_fk",
          "tableFrom": "option",
          "tableTo": "turn",
          "columnsFrom": [
            "turn_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "project": {
      "name": "project",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "active_turn_id": {
          "name": "active_turn_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(datetime('now'))"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(datetime('now'))"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "requirement": {
      "name": "requirement",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": true
        },
        "project_id": {
          "name": "project_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "reviewed_at": {
          "name": "reviewed_at",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "requirement_project_id_project_id_fk": {
          "name": "requirement_project_id_project_id_fk",
          "tableFrom": "requirement",
          "tableTo": "project",
          "columnsFrom": [
            "project_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "requirement_decision": {
      "name": "requirement_decision",
      "columns": {
        "requirement_id": {
          "name": "requirement_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "decision_id": {
          "name": "decision_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "requirement_decision_requirement_id_requirement_id_fk": {
          "name": "requirement_decision_requirement_id_requirement_id_fk",
          "tableFrom": "requirement_decision",
          "tableTo": "requirement",
          "columnsFrom": [
            "requirement_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "requirement_decision_decision_id_decision_id_fk": {
          "name": "requirement_decision_decision_id_decision_id_fk",
          "tableFrom": "requirement_decision",
          "tableTo": "decision",
          "columnsFrom": [
            "decision_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "requirement_decision_requirement_id_decision_id_pk": {
          "columns": [
            "requirement_id",
            "decision_id"
          ],
          "name": "requirement_decision_requirement_id_decision_id_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "turn": {
      "name": "turn",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "autoincrement": true
        },
        "project_id": {
          "name": "project_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "parent_turn_id": {
          "name": "parent_turn_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "phase": {
          "name": "phase",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "question": {
          "name": "question",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "''"
        },
        "why": {
          "name": "why",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "impact": {
          "name": "impact",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "answer": {
          "name": "answer",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "is_resolution": {
          "name": "is_resolution",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": false
        },
        "user_parts": {
          "name": "user_parts",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "assistant_parts": {
          "name": "assistant_parts",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "created_at": {
          "name": "created_at",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(datetime('now'))"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "turn_project_id_project_id_fk": {
          "name": "turn_project_id_project_id_fk",
          "tableFrom": "turn",
          "tableTo": "project",
          "columnsFrom": [
            "project_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "turn_parent_turn_id_turn_id_fk": {
          "name": "turn_parent_turn_id_turn_id_fk",
          "tableFrom": "turn",
          "tableTo": "turn",
          "columnsFrom": [
            "parent_turn_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "turn_assumption": {
      "name": "turn_assumption",
      "columns": {
        "turn_id": {
          "name": "turn_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "assumption_id": {
          "name": "assumption_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "turn_assumption_turn_id_turn_id_fk": {
          "name": "turn_assumption_turn_id_turn_id_fk",
          "tableFrom": "turn_assumption",
          "tableTo": "turn",
          "columnsFrom": [
            "turn_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "turn_assumption_assumption_id_assumption_id_fk": {
          "name": "turn_assumption_assumption_id_assumption_id_fk",
          "tableFrom": "turn_assumption",
          "tableTo": "assumption",
          "columnsFrom": [
            "assumption_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "turn_assumption_turn_id_assumption_id_pk": {
          "columns": [
            "turn_id",
            "assumption_id"
          ],
          "name": "turn_assumption_turn_id_assumption_id_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    },
    "turn_decision": {
      "name": "turn_decision",
      "columns": {
        "turn_id": {
          "name": "turn_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "decision_id": {
          "name": "decision_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "turn_decision_turn_id_turn_id_fk": {
          "name": "turn_decision_turn_id_turn_id_fk",
          "tableFrom": "turn_decision",
          "tableTo": "turn",
          "columnsFrom": [
            "turn_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "turn_decision_decision_id_decision_id_fk": {
          "name": "turn_decision_decision_id_decision_id_fk",
          "tableFrom": "turn_decision",
          "tableTo": "decision",
          "columnsFrom": [
            "decision_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "turn_decision_turn_id_decision_id_pk": {
          "columns": [
            "turn_id",
            "decision_id"
          ],
          "name": "turn_decision_turn_id_decision_id_pk"
        }
      },
      "uniqueConstraints": {},
      "checkConstraints": {}
    }
  },
  "views": {},
  "enums": {},
  "_meta": {
    "schemas": {},
    "tables": {},
    "columns": {}
  },
  "internal": {
    "indexes": {}
  }
}