Compare commits
152
Commits
0e314e44dd
...
v2.12.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c31f79d3d4 | ||
|
|
22e70ffcb4 | ||
|
|
8d597df448 | ||
|
|
1affb39716 | ||
|
|
bbdb022327 | ||
|
|
7e147deddc | ||
|
|
1a24152261 | ||
|
|
84219a9f88 | ||
|
|
4e55f9161c | ||
|
|
cb69e2a7f5 | ||
|
|
8329c92598 | ||
|
|
3322152b9c | ||
|
|
2fe2ac83b1 | ||
|
|
fb1ceac192 | ||
|
|
e91ade9cad | ||
|
|
020f93d55e | ||
|
|
f0a3a186dd | ||
|
|
2e236736a7 | ||
|
|
5aafeb6c3d | ||
|
|
1065278021 | ||
|
|
e9dfea905f | ||
|
|
2a3c937f70 | ||
|
|
41bfc242fa | ||
|
|
3171690bae | ||
|
|
5a13ad4492 | ||
|
|
63184ea3b3 | ||
|
|
1ef677609f | ||
|
|
d474fd13ea | ||
|
|
13b81cac68 | ||
|
|
31d53b0033 | ||
|
|
4464dc6ff1 | ||
|
|
5cc99bfec6 | ||
|
|
24e1d648ee | ||
|
|
18755910bd | ||
|
|
d7a3aa80c3 | ||
|
|
741c7ac58d | ||
|
|
d0c726baa0 | ||
|
|
89f0371279 | ||
|
|
c1ab042d0a | ||
|
|
bce0c9d897 | ||
|
|
f70aec495b | ||
|
|
421f06866e | ||
|
|
187f5fc532 | ||
|
|
168ab1cd2f | ||
|
|
533a287eb9 | ||
|
|
299c7b749c | ||
|
|
c4928b4def | ||
|
|
7fe8729603 | ||
|
|
0f007c5367 | ||
|
|
c593be2f02 | ||
|
|
8930b564e4 | ||
|
|
39d8241360 | ||
|
|
69fcceb2ed | ||
|
|
f80af122e9 | ||
|
|
d71c0ceaef | ||
|
|
296251e27e | ||
|
|
76d836a278 | ||
|
|
81994aadca | ||
|
|
a1d74ab45d | ||
|
|
f3cb34b904 | ||
|
|
57be4961a8 | ||
|
|
9ab17d827b | ||
|
|
514f142a4e | ||
|
|
4e8e0334b2 | ||
|
|
cf6a6b6208 | ||
|
|
71d2972a97 | ||
|
|
c02a4cf871 | ||
|
|
022eaf385c | ||
|
|
3003cfa561 | ||
|
|
2dec590dfc | ||
|
|
884b990e22 | ||
|
|
c0bf7db628 | ||
|
|
a873eaa9e2 | ||
|
|
bf56cd8c75 | ||
|
|
074c0e4dbd | ||
|
|
bac0d69a49 | ||
|
|
66f743dd43 | ||
|
|
3c3bb30696 | ||
|
|
40879705ac | ||
|
|
44337d4b94 | ||
|
|
3f3638c1ce | ||
|
|
a92180456d | ||
|
|
d6b22ea528 | ||
|
|
580d4e0717 | ||
|
|
2fca0cc4d3 | ||
|
|
106f9a374a | ||
|
|
16952b6432 | ||
|
|
1cb574bd96 | ||
|
|
0e74650d70 | ||
|
|
664816881a | ||
|
|
67083e1a4a | ||
|
|
9c59c77a28 | ||
|
|
b2a1b79029 | ||
|
|
d309302043 | ||
|
|
baba921696 | ||
|
|
9578c95074 | ||
|
|
e164f1e33f | ||
|
|
79438c00d2 | ||
|
|
29171b104b | ||
|
|
3dfae30fff | ||
|
|
55bfb765e6 | ||
|
|
07dd75700d | ||
|
|
290dd1b614 | ||
|
|
0892883a82 | ||
|
|
89d30d1463 | ||
|
|
eb2160dfc2 | ||
|
|
b598ec2fac | ||
|
|
9c4a63d2c5 | ||
|
|
ac9b0dab29 | ||
|
|
7f94bf4aed | ||
|
|
93be76a144 | ||
|
|
ea2271cc3e | ||
|
|
36720d33ae | ||
|
|
302d657644 | ||
|
|
ff37a97ade | ||
|
|
0d1dd169ac | ||
|
|
a6d165a177 | ||
|
|
8f983851b4 | ||
|
|
8dce2d0898 | ||
|
|
111dd0fb0d | ||
|
|
c47cdc1c7c | ||
|
|
56c3719e98 | ||
|
|
a80a31eeac | ||
|
|
51dc7bd61b | ||
|
|
c3ef460a40 | ||
|
|
c143eb2481 | ||
|
|
ab449d51eb | ||
|
|
beca1d8c99 | ||
|
|
6ec81f653b | ||
|
|
eba0d842b5 | ||
|
|
42de97e16a | ||
|
|
2986896223 | ||
|
|
dcda067b48 | ||
|
|
7f337b36c7 | ||
|
|
ce98f65ca5 | ||
|
|
52efe3ec48 | ||
|
|
7e91aaa255 | ||
|
|
b997af4423 | ||
|
|
9159f1b55c | ||
|
|
36bb7a83b8 | ||
|
|
2935eef75a | ||
|
|
cc60cb4f0a | ||
|
|
dbb73bae38 | ||
|
|
4fc64732ec | ||
|
|
99bb5be5da | ||
|
|
fdd0e1e56a | ||
|
|
69ba37e3f3 | ||
|
|
f205843020 | ||
|
|
389c9126c8 | ||
|
|
4cf08f8159 | ||
|
|
925ba655a9 | ||
|
|
f9a8ed761a |
+1421
-1184
File diff suppressed because it is too large
Load Diff
@@ -29,10 +29,10 @@ have none; this file plus the code is all there is for them.
|
|||||||
|
|
||||||
## Key Paths
|
## Key Paths
|
||||||
|
|
||||||
- DB: `~/.todo-app/todo.db`
|
- DB: `~/.claudeDo/todo.db`
|
||||||
- UI config: `~/.todo-app/ui.config.json`
|
- UI config: `~/.claudeDo/ui.config.json`
|
||||||
- Worker config: `~/.todo-app/worker.config.json`
|
- Worker config: `~/.claudeDo/worker.config.json`
|
||||||
- Logs: `~/.todo-app/logs/`
|
- Logs: `~/.claudeDo/logs/`
|
||||||
- Worktrees: configured per worker (sibling or central strategy)
|
- Worktrees: configured per worker (sibling or central strategy)
|
||||||
|
|
||||||
## Conventions
|
## Conventions
|
||||||
@@ -76,7 +76,7 @@ dotnet test tests/ClaudeDo.Worker.Tests/ClaudeDo.Worker.Tests.csproj -c Release
|
|||||||
|
|
||||||
### Gotchas
|
### Gotchas
|
||||||
- **Subagents:** use the `sonnet` model; stage files explicitly by path — never `git add -A` (parallel sessions often leave unrelated WIP in the tree).
|
- **Subagents:** use the `sonnet` model; stage files explicitly by path — never `git add -A` (parallel sessions often leave unrelated WIP in the tree).
|
||||||
- **Icons:** `PathIcon` *fills* its geometry. Line-art/stroke icons must be authored as filled geometry, or rendered with a stroked `Path` — otherwise they render invisible.
|
- **Icons:** `PathIcon` *fills* its geometry — line-art icons must be filled geometry or a `Path Classes="icon-stroke"`, else they render invisible. Colour comes from the `ICON PAINTING` block in `IslandStyles.axaml` (class + state); setting `Foreground`/`Stroke` inline kills the hover state.
|
||||||
- **Localization:** `locales/en.json` and `locales/de.json` keys must stay in parity (Localization.Tests enforces it).
|
- **Localization:** `locales/en.json` and `locales/de.json` keys must stay in parity (Localization.Tests enforces it).
|
||||||
- **Test fakes:** changing `IWorkerClient` / `WorkerHub` / ViewModel constructors breaks hand-rolled fakes in both test projects — update them.
|
- **Test fakes:** changing `IWorkerClient` / `WorkerHub` / ViewModel constructors breaks hand-rolled fakes in both test projects — update them.
|
||||||
|
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ updates`.
|
|||||||
|
|
||||||
## Where your data lives
|
## Where your data lives
|
||||||
|
|
||||||
Everything is under `%USERPROFILE%\.todo-app`:
|
Everything is under `%USERPROFILE%\.claudeDo`:
|
||||||
|
|
||||||
| Path | What |
|
| Path | What |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Two independent reasons:
|
|||||||
`--abort`) is then misread as an unknown option.
|
`--abort`) is then misread as an unknown option.
|
||||||
2. A raw multi-line positional prompt truncates at its **first newline** regardless.
|
2. A raw multi-line positional prompt truncates at its **first newline** regardless.
|
||||||
|
|
||||||
A fresh task session's brief lives at `~/.todo-app/task-sessions/<taskId>/brief.md`
|
A fresh task session's brief lives at `~/.claudeDo/task-sessions/<taskId>/brief.md`
|
||||||
(`InteractiveLaunchSpecService.BuildFreshTaskArgsAsync`). A task with neither title nor
|
(`InteractiveLaunchSpecService.BuildFreshTaskArgsAsync`). A task with neither title nor
|
||||||
description skips the file **and** the positional arg entirely — it still gets `--session-id`.
|
description skips the file **and** the positional arg entirely — it still gets `--session-id`.
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ Task: `ListTaskLists`, `ListTasks`, `GetTask`, `AddTask`, `AddSubtask`, `UpdateT
|
|||||||
description is now the canonical place for what each status means.)
|
description is now the canonical place for what each status means.)
|
||||||
|
|
||||||
Worktree/git: `GetTaskWorktree`, `GetTaskDiff`, `MergeTask`, `ContinueMerge`, `AbortMerge`,
|
Worktree/git: `GetTaskWorktree`, `GetTaskDiff`, `MergeTask`, `ContinueMerge`, `AbortMerge`,
|
||||||
`PreviewMerge`, `PreviewMergeSet`, `RevertMerge`, `ListWorktrees`, `CleanupTaskWorktree`.
|
`VerifyMerges`, `PreviewMerge`, `PreviewMergeSet`, `RevertMerge`, `ListWorktrees`,
|
||||||
|
`CleanupTaskWorktree`.
|
||||||
|
|
||||||
Daily prep: `GetDailyPrepCandidates`, `SetMyDay`.
|
Daily prep: `GetDailyPrepCandidates`, `SetMyDay`.
|
||||||
|
|
||||||
@@ -131,6 +132,18 @@ are reported in `ReviewTaskResult`.
|
|||||||
`Done` and merged silently with `changedFileCount: 0`, indistinguishable from a small-but-real
|
`Done` and merged silently with `changedFileCount: 0`, indistinguishable from a small-but-real
|
||||||
change. `TaskRefDto.roadblockCount` (on every task-returning tool, stamped by `TaskRunner` from
|
change. `TaskRefDto.roadblockCount` (on every task-returning tool, stamped by `TaskRunner` from
|
||||||
`result.Blocks.Count`) is the MCP-visible signal for *why* a child is empty.
|
`result.Blocks.Count`) is the MCP-visible signal for *why* a child is empty.
|
||||||
|
- `skipVerify=true` (also on `MergeTask`/`ContinueMerge`) is batch mode: the merge lands but the
|
||||||
|
list's verify command is deferred and the task stays `WaitingForReview` with mergeStatus
|
||||||
|
`merged_verify_pending`. One `VerifyMerges` call after the batch runs the verify once and
|
||||||
|
promotes them — see [review-merge.md](review-merge.md) → batch verify.
|
||||||
|
|
||||||
|
**`VerifyMerges`** — `verify_merges(taskIds)`: runs the list's verify command ONCE (same per-repo
|
||||||
|
merge gate) and promotes each listed task to Done via `ApproveReviewAsync` on success. Explicit
|
||||||
|
ids on purpose — auto-promoting every `WaitingForReview` task would sweep up the handler's own
|
||||||
|
task and deliberately parked `verify_failed` tasks. Eligibility per task: `WaitingForReview` AND
|
||||||
|
(worktree `Merged` OR no worktree); an `Active` worktree means the branch never landed and is
|
||||||
|
refused per-entry (the rest still promote). All ids must share one list. `verify_failed` promotes
|
||||||
|
nothing; the merges stay in place.
|
||||||
|
|
||||||
**`PreviewMerge`** — non-destructive `git merge-tree --write-tree` mergeability check for one
|
**`PreviewMerge`** — non-destructive `git merge-tree --write-tree` mergeability check for one
|
||||||
task's worktree branch against `targetBranch` (default: the repo's current branch). Returns
|
task's worktree branch against `targetBranch` (default: the repo's current branch). Returns
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Review, merge & conflict resolution
|
# Review, merge & conflict resolution
|
||||||
|
|
||||||
> **Explore-note — verify before trusting.** Distilled map of a subsystem, not authoritative.
|
> **Explore-note — verify before trusting.** Distilled map of a subsystem, not authoritative.
|
||||||
> Last verified against `fc9df7f` (2026-08-11), which added the conventional merge-commit default
|
> Last verified against `168ab1cd` (2026-08-26), which added the batch verify
|
||||||
> and the `MergeProgress` broadcast.
|
> (`skipVerify` + `verify_merges`).
|
||||||
> Planning mode renders per file and `DiffLinesView` is retired.
|
> Planning mode renders per file and `DiffLinesView` is retired.
|
||||||
> Drift check: `git log --oneline 20bce9b..HEAD -- src/ClaudeDo.Worker/Lifecycle src/ClaudeDo.Worker/State src/ClaudeDo.Worker/Planning src/ClaudeDo.Ui/ViewModels/Conflicts src/ClaudeDo.Worker/External`
|
> Drift check: `git log --oneline 20bce9b..HEAD -- src/ClaudeDo.Worker/Lifecycle src/ClaudeDo.Worker/State src/ClaudeDo.Worker/Planning src/ClaudeDo.Ui/ViewModels/Conflicts src/ClaudeDo.Worker/External`
|
||||||
> Stable structure only (no line numbers). See docs/explore-notes/README.md.
|
> Stable structure only (no line numbers). See docs/explore-notes/README.md.
|
||||||
@@ -76,6 +76,23 @@ DB write. Cycle note: `TaskStateService` can't take a direct constructor depende
|
|||||||
handed to `PlanningChainCoordinator`. `IActiveMergeState` (`Planning/Interfaces/`) is `PlanningMergeOrchestrator`'s
|
handed to `PlanningChainCoordinator`. `IActiveMergeState` (`Planning/Interfaces/`) is `PlanningMergeOrchestrator`'s
|
||||||
only public surface `TaskStateService` needs.
|
only public surface `TaskStateService` needs.
|
||||||
|
|
||||||
|
`HasActiveMerge` also stays true through the window between the last child merging and
|
||||||
|
`FinalizeParentDoneAsync` returning (a separate `State.IsFinalizing` flag — `CurrentSubtaskId` is
|
||||||
|
already null there since no subtask is left to merge). Without it, a `Cancel` racing the finalize
|
||||||
|
call's own `ApproveReviewAsync` could slip past the guard for that whole call. `StartAsync` also now
|
||||||
|
requires the parent to already be `WaitingForReview` — for planning **and** improvement parents —
|
||||||
|
before touching anything; previously only planning parents got an (indirect, children-only) check,
|
||||||
|
so a stale UI click or a second caller on an improvement parent that had already left
|
||||||
|
`WaitingForReview` could still drive a partial child merge before the final approve refused.
|
||||||
|
|
||||||
|
Unit-merge failures used to vanish silently: a child merge that came back
|
||||||
|
`blocked`/`verify_failed`/`untracked_collision` (not `conflict`) was only logged server-side, and
|
||||||
|
`ApproveReview`/`review_task` approve always reported success (`StatusMerged`) regardless.
|
||||||
|
`StartAsync`/`ContinueAsync`/the private `DrainAsync` now return a `PlanningMergeResult(Status,
|
||||||
|
Reason)` that both hub paths propagate as the real status, and `PlanningMergeAborted` carries that
|
||||||
|
reason so the UI's `IslandsShellViewModel.OnPlanningMergeAborted` can `FlashFooterError` it instead
|
||||||
|
of only clearing the banner.
|
||||||
|
|
||||||
The UI mirrors this as polish: `DetailsIslandViewModel.IsMergeDraining` (set on
|
The UI mirrors this as polish: `DetailsIslandViewModel.IsMergeDraining` (set on
|
||||||
`PlanningMergeStartedEvent`, cleared on `PlanningMergeAborted`/`PlanningCompleted` for the bound
|
`PlanningMergeStartedEvent`, cleared on `PlanningMergeAborted`/`PlanningCompleted` for the bound
|
||||||
task) gates `CancelReviewCommand`'s `CanExecute` — same shape as `WorktreesOverviewModalViewModel.IsMerging`
|
task) gates `CancelReviewCommand`'s `CanExecute` — same shape as `WorktreesOverviewModalViewModel.IsMerging`
|
||||||
@@ -136,6 +153,27 @@ dead app for minutes while the merge has in fact already landed.
|
|||||||
so a verify run can't be interrupted by a second merge landing in the same working dir
|
so a verify run can't be interrupted by a second merge landing in the same working dir
|
||||||
mid-build.
|
mid-build.
|
||||||
|
|
||||||
|
### Batch verify (skipVerify + verify_merges)
|
||||||
|
|
||||||
|
Per-merge verify made an N-task batch pay N × ~7 min, each run testing the same moving main.
|
||||||
|
`MergeAsync`/`ContinueMergeAsync`/`ApproveAndMergeAsync` take `skipVerify` (MCP-only —
|
||||||
|
`review_task`/`merge_task`/`continue_merge` expose it; the UI approve never passes it): the merge
|
||||||
|
lands normally but the gate AND the Done transition are deferred — status
|
||||||
|
`merged_verify_pending`, task stays `WaitingForReview` with a `Merged` worktree (the same shape
|
||||||
|
`verify_failed` leaves behind). `TaskMergeService.RunListVerifyAsync` (tool `verify_merges`) then
|
||||||
|
runs the command once under the same per-repo gate and promotes the explicitly listed tasks via
|
||||||
|
`ApproveReviewAsync`. Explicit ids, not a query — auto-promotion would sweep up the handler's own
|
||||||
|
submitted task and parked `verify_failed` tasks. A task whose worktree is still `Active` is
|
||||||
|
refused per-entry (branch never landed → would go Done with an unmerged branch).
|
||||||
|
|
||||||
|
`PlanningMergeOrchestrator` threads `skipVerify` through the unit merge (`State.SkipVerify`), so
|
||||||
|
children no longer pay the gate per child; when any child came back `merged_verify_pending` the
|
||||||
|
drain skips `FinalizeParentDoneAsync` (a finalize would grant a Done nothing verified), still
|
||||||
|
broadcasts `PlanningCompleted` (the drain IS complete; the UI banner must clear), and returns
|
||||||
|
`merged_verify_pending` — the parent is promoted later by `verify_merges` like any other task.
|
||||||
|
The merge-helper Merge prompt approves with `skipVerify=true` and calls `verify_merges` once
|
||||||
|
after the last merge; the invariant "no Done without a green verify" stays server-enforced.
|
||||||
|
|
||||||
### Verify in the preview, not just post-merge
|
### Verify in the preview, not just post-merge
|
||||||
|
|
||||||
`TaskMergeService.PreviewAsync(taskId, targetBranch, runVerify, ct)` can additionally build/test a
|
`TaskMergeService.PreviewAsync(taskId, targetBranch, runVerify, ct)` can additionally build/test a
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
# Usage monitoring, gate & throttle
|
# Usage monitoring, gate & throttle
|
||||||
|
|
||||||
> **Explore-note — verify before trusting.** Distilled map of a subsystem, not authoritative.
|
> **Explore-note — verify before trusting.** Distilled map of a subsystem, not authoritative.
|
||||||
> Last verified against commit `f6cb825` (2026-08-05), plus the uncommitted per-bucket-throttle /
|
> Last verified against commit `bf56cd8c` (2026-08-24).
|
||||||
> draggable-gauge change of 2026-08-06 (this note already describes that newer state).
|
> Drift check: `git log --oneline bf56cd8c..HEAD -- src/ClaudeDo.Worker/Usage src/ClaudeDo.Worker/Queue src/ClaudeDo.Ui/ViewModels/UsagePillViewModel.cs`
|
||||||
> Drift check: `git log --oneline f6cb825..HEAD -- src/ClaudeDo.Worker/Usage src/ClaudeDo.Worker/Queue src/ClaudeDo.Ui/ViewModels/UsagePillViewModel.cs`
|
|
||||||
> Stable structure only (no line numbers). See docs/explore-notes/README.md.
|
> Stable structure only (no line numbers). See docs/explore-notes/README.md.
|
||||||
|
|
||||||
Covers `src/ClaudeDo.Worker/Usage/`, the queue's throttle/gate integration, per-run token
|
Covers `src/ClaudeDo.Worker/Usage/`, the queue's throttle/gate integration, per-run token
|
||||||
accounting, and the UI surfaces (usage pill + usage monitor modal).
|
accounting, and the UI surfaces (usage pill + usage monitor modal).
|
||||||
|
|
||||||
## Data source
|
**Two independent data sources, on purpose.** Limits/gate/throttle come from the OAuth poll
|
||||||
|
below; the *analytics* (per-model and per-task breakdown, cost) come from the external
|
||||||
|
TokenTracker CLI. Neither one can break the other.
|
||||||
|
|
||||||
|
## Data source (limits, gate, throttle)
|
||||||
|
|
||||||
`GET https://api.anthropic.com/api/oauth/usage` — an **undocumented** Anthropic endpoint,
|
`GET https://api.anthropic.com/api/oauth/usage` — an **undocumented** Anthropic endpoint,
|
||||||
authenticated with the Bearer access token Claude Code itself keeps fresh at
|
authenticated with the Bearer access token Claude Code itself keeps fresh at
|
||||||
@@ -29,9 +32,11 @@ fails open**. That is the single most important invariant here.
|
|||||||
| `UsageSnapshotBuilder` | Builds the Hub-facing `UsageSnapshotDto` from `UsageState` + `IUsageGate` + `AppSettings`. The one shared place for stale/threshold/gate logic — `WorkerHub.GetUsageSnapshot` and `UsageMonitorService` must not diverge. |
|
| `UsageSnapshotBuilder` | Builds the Hub-facing `UsageSnapshotDto` from `UsageState` + `IUsageGate` + `AppSettings`. The one shared place for stale/threshold/gate logic — `WorkerHub.GetUsageSnapshot` and `UsageMonitorService` must not diverge. |
|
||||||
| `UsageGate` | Hard pause decision → `UsageGateDecision(IsBlocked, Reason)`. |
|
| `UsageGate` | Hard pause decision → `UsageGateDecision(IsBlocked, Reason)`. |
|
||||||
| `UsageThrottle` | Pure static staging of parallelism ahead of the gate. |
|
| `UsageThrottle` | Pure static staging of parallelism ahead of the gate. |
|
||||||
| `TranscriptUsageReader` | Aggregates token usage from Claude Code transcripts. |
|
| `TranscriptUsageReader` | Reads **one** session's cumulative totals for per-run accounting. **No** aggregation — the date/model/scope roll-up moved to `TokenTracker/`. |
|
||||||
|
| `TokenTracker/` | The external analytics backend: cost + per-model/per-task breakdown. Own section below. |
|
||||||
|
|
||||||
Interfaces in `Usage/Interfaces/`: `IUsageClient`, `ITranscriptUsageReader`, `IUsageGate`.
|
Interfaces in `Usage/Interfaces/`: `IUsageClient`, `ITranscriptUsageReader`, `IUsageGate`;
|
||||||
|
plus `Usage/TokenTracker/Interfaces/ITokenTrackerClient`.
|
||||||
|
|
||||||
## The gate (hard pause)
|
## The gate (hard pause)
|
||||||
|
|
||||||
@@ -109,18 +114,67 @@ stores the **delta** against prior `task_runs` rows sharing the same `session_id
|
|||||||
|
|
||||||
A missing/unreadable transcript leaves all four fields `null`; it never fails the run.
|
A missing/unreadable transcript leaves all four fields `null`; it never fails the run.
|
||||||
|
|
||||||
|
`ReadSessionTotalsAsync` **stays** — it is the per-run source of truth and is deliberately *not*
|
||||||
|
routed through TokenTracker, whose export has no per-run granularity (it aggregates a whole
|
||||||
|
session, which a `--resume`'d task spreads over several runs).
|
||||||
|
|
||||||
### `TranscriptUsageReader` details
|
### `TranscriptUsageReader` details
|
||||||
|
|
||||||
Reads `~/.claude/projects/**/*.jsonl`, aggregating by date / model / scope (ClaudeDo vs
|
Locates a single `{sessionId}.jsonl` under `~/.claude/projects/**`, sums the raw `usage` fields of
|
||||||
Other), deduped by `requestId`, with a per-file length+mtime cache.
|
every assistant message, deduped by `requestId` (falling back to `message.id`), with a per-file
|
||||||
|
length+mtime cache. `<synthetic>`-model lines are skipped — they are not real API calls.
|
||||||
|
|
||||||
`ReadAsync` **skips any file whose mtime predates the window start minus one day** — it cannot hold
|
There is no history-wide `ReadAsync` any more; `WorkerConfig` is still a constructor parameter
|
||||||
a record inside the range, and the full history is large (measured 2026-08-06: 501 files / 230 MB /
|
purely so the DI registration and call sites stayed untouched.
|
||||||
77k lines ≈ 1.7 s to parse cold; a 7-day range touches ~190 files / ~106 MB). The one-day slack
|
|
||||||
absorbs local-vs-UTC skew between mtime and record timestamps. `ReadSessionTotalsAsync` is
|
|
||||||
unaffected — it looks up a single `{sessionId}.jsonl`.
|
|
||||||
|
|
||||||
`<synthetic>`-model lines are skipped **everywhere** — they are not real API calls.
|
## Analytics via TokenTracker
|
||||||
|
|
||||||
|
The per-model / per-task / cost view comes from **TokenTracker**, an external MIT-licensed CLI
|
||||||
|
(`tokentracker-cli`, npm) that reads the same local Claude transcripts. Everything lives in
|
||||||
|
`Usage/TokenTracker/`; the pure parts (`SessionHash`, `TokenTrackerArgs`,
|
||||||
|
`TokenTrackerExportParser`, `TokenTrackerAggregator`) have no I/O and are unit-tested, only
|
||||||
|
`TokenTrackerClient` (processes) and `TokenTrackerService` (cache coordination) touch the world.
|
||||||
|
|
||||||
|
- **Invocation:** `tokentracker sessions --from <d> --to <d> --no-git --format json`
|
||||||
|
(`TokenTrackerArgs`). `--no-git` matters — without it TokenTracker runs `git log` inside every
|
||||||
|
session's working directory. We **never** call `tokentracker init`: that would write hooks into
|
||||||
|
the user's global `~/.claude/settings.json` and switch on cloud sync. Install is an explicit
|
||||||
|
`npm i -g tokentracker-cli`, never `npx`. Resolution goes through the shared
|
||||||
|
`ExecutableResolver` because an npm CLI is a `.cmd` shim.
|
||||||
|
- **The join:** the export never carries a raw session id, only `session_hash` =
|
||||||
|
`sha256("claude\0" + sessionId)` hex, first 24 chars (`SessionHash.ForClaudeSession`,
|
||||||
|
mirroring TokenTracker's `lib/session-analytics.js`). That hash set — built from
|
||||||
|
`task_runs.session_id` — is also what decides the **ClaudeDo vs. other** scope split. Note this
|
||||||
|
is *narrower* than the old cwd-based split: an interactive or planning session has no
|
||||||
|
`task_runs` row and therefore counts as "other".
|
||||||
|
- **One wide fetch, local filtering:** `TokenTrackerService.WindowDays` = 90. TokenTracker's
|
||||||
|
`buildSessionAnalytics` walks the whole history regardless of `--from`/`--to` (v0.88.4 returns
|
||||||
|
the same rows either way), so narrowing the request buys nothing while making every range switch
|
||||||
|
pay again. Range switching is then pure in-memory filtering in `TokenTrackerAggregator`.
|
||||||
|
- **Freshness:** `EnsureFreshAsync(maxAge)`. No export at all → the caller awaits the fetch;
|
||||||
|
an export older than **15 minutes** → served immediately while a refresh runs behind the
|
||||||
|
caller's back. `RefreshAsync` is single-flight (a second caller waits for the in-flight run
|
||||||
|
instead of spawning another process). The probe (CLI present? Node ≥ 20?) is cached until an
|
||||||
|
install forces it.
|
||||||
|
- **Version check:** the export's `version` field is compared against
|
||||||
|
`TokenTrackerExportParser.SupportedFormatVersion` (11). A mismatch is treated as a **failure**
|
||||||
|
— the state keeps the last good export and reports the version in `LastError`.
|
||||||
|
- **Fail-open everywhere:** `TokenTrackerState` mirrors `UsageState` — a failed or unparseable
|
||||||
|
fetch never overwrites a good export, it only sets `LastError`. CLI missing → empty analytics
|
||||||
|
plus a hint card in the UI. Nothing here can throw into the queue.
|
||||||
|
- **Local dashboard:** `tokentracker serve --port <p> --no-open --no-sync`, started by the worker on
|
||||||
|
demand (`ITokenTrackerClient.StartDashboardAsync`) for the "Open TokenTracker dashboard" button.
|
||||||
|
Three things this path has to get right: TokenTracker's default port **7680 is not free** on
|
||||||
|
Windows (Delivery Optimization holds `[::]:7680`) and `serve` exits instead of falling back, so
|
||||||
|
we scan 7680–7689 with a **dual-stack** bind probe (an IPv4-only probe calls 7680 free and the
|
||||||
|
spawn then dies); `--no-open` because the CLI would open the browser before the server answers,
|
||||||
|
so we poll `GET http://127.0.0.1:<p>/` (30 s cap) and let the **UI** open the URL; and the child
|
||||||
|
is a `cmd.exe` shim, so shutdown kills the **process tree** or node keeps listening. The
|
||||||
|
spawned server is reused while alive and dies with the worker (`TokenTrackerClient` is
|
||||||
|
`IDisposable`, registered as a singleton) — a worker *crash* leaks it until the port is scanned
|
||||||
|
past.
|
||||||
|
- **Limits, gate and throttle do *not* come from TokenTracker.** They are the OAuth poll above.
|
||||||
|
A broken or absent TokenTracker costs you the cost columns, nothing else.
|
||||||
|
|
||||||
## UI surfaces
|
## UI surfaces
|
||||||
|
|
||||||
@@ -153,17 +207,41 @@ unaffected — it looks up a single `{sessionId}.jsonl`.
|
|||||||
`seven_day_sonnet`-style buckets the raw API returns are plan-dependent and come back
|
`seven_day_sonnet`-style buckets the raw API returns are plan-dependent and come back
|
||||||
`null` on plans that don't have them; a fixed gauge layout would break. Also shows model
|
`null` on plans that don't have them; a fixed gauge layout would break. Also shows model
|
||||||
usage (`GetModelUsageAsync`, ClaudeDo-vs-Other split per model) and top-task usage
|
usage (`GetModelUsageAsync`, ClaudeDo-vs-Other split per model) and top-task usage
|
||||||
(`GetTaskUsageAsync`) over a 7d/30d preset or custom range.
|
(`GetTaskUsageAsync`) over a 7d/30d preset or custom range — both with a **cost** column, the
|
||||||
|
task table additionally with retries.
|
||||||
|
- **Analytics header vs. hint card** — the modal shows exactly one of the two. With TokenTracker
|
||||||
|
present: total tokens + total cost, a freshness stamp, a manual `RefreshAnalytics` button and an
|
||||||
|
**Open TokenTracker dashboard** button (spinner while the server boots; everything this modal
|
||||||
|
deliberately doesn't show lives there).
|
||||||
|
Without it: a hint card explaining what TokenTracker is (local only, no `init`, no cloud sync)
|
||||||
|
plus an `Install TokenTracker` button — which is hidden and replaced by a Node-version hint when
|
||||||
|
Node < 20 or Node is missing, because the install would just fail. Install progress and every
|
||||||
|
failure go through `ErrorReported` into the shell's footer log strip, not a private banner.
|
||||||
|
|
||||||
## Hub surface
|
## Hub surface
|
||||||
|
|
||||||
- `GetUsageSnapshot() -> UsageSnapshotDto` — percentages/limits/`FetchedAtUtc` are null and
|
- `GetUsageSnapshot() -> UsageSnapshotDto` — percentages/limits/`FetchedAtUtc` are null and
|
||||||
`IsStale=true` when no snapshot has landed yet. `IsStale` also trips on a failed last poll
|
`IsStale=true` when no snapshot has landed yet. `IsStale` also trips on a failed last poll
|
||||||
or a snapshot older than 3× `usage_poll_interval_seconds`.
|
or a snapshot older than 3× `usage_poll_interval_seconds`.
|
||||||
- `GetModelUsage(from, to)` — thin wrapper over `ITranscriptUsageReader.ReadAsync`.
|
- `GetModelUsage(from, to)` — filters + aggregates the **cached TokenTracker export**
|
||||||
- `GetTaskUsage(from, to)` — top consumers from `task_runs` joined to task/list, grouped per
|
(`TokenTrackerAggregator.ByModel`). Returns an empty list rather than throwing when TokenTracker
|
||||||
task. Null token columns count as **0**, never drop the row. `Model` comes from that task's
|
is unconfigured or no export landed. `Sessions` replaced the old assistant-message count — the
|
||||||
most recent run. Sorted by total tokens descending, capped at 100.
|
export has no message granularity.
|
||||||
|
- `GetTaskUsage(from, to)` — unchanged source: top consumers from `task_runs` joined to task/list,
|
||||||
|
grouped per task. Null token columns count as **0**, never drop the row. `Model` comes from that
|
||||||
|
task's most recent run. Sorted by total tokens descending, capped at 100. Cost/retries/
|
||||||
|
productive/one-shot are an **enrichment** via the `session_hash` join — a missing export just
|
||||||
|
leaves those columns empty, it never triggers a fetch (`GetModelUsage` is what does).
|
||||||
|
- `GetTokenTrackerStatus()` — probe + state, as `TokenTrackerStatusDto(Installed, Version, NodeOk,
|
||||||
|
NodeVersion, LastFetchedUtc, LastError, FormatVersion, SessionCount)`. Never throws; an
|
||||||
|
unconfigured worker comes back as not-installed with a reason.
|
||||||
|
- `RefreshTokenTracker()` — forces a fetch, then re-probes and returns the status.
|
||||||
|
- `OpenTokenTrackerDashboard()` — brings up the local dashboard server and returns
|
||||||
|
`TokenTrackerDashboardDto(Ok, Url, Error)`; the UI opens the browser (`ShellOpen.Url`, which
|
||||||
|
refuses anything that isn't http/https). Never throws — a failure also lands in `WorkerLog`.
|
||||||
|
- `InstallTokenTracker()` — `npm i -g tokentracker-cli`, streaming npm's output line by line into
|
||||||
|
`WorkerLog` (npm writes progress to stderr; forwarding it is what keeps a multi-minute global
|
||||||
|
install from looking hung), then force-re-probes.
|
||||||
- `UsageUpdated` event carries the same `UsageSnapshotDto`.
|
- `UsageUpdated` event carries the same `UsageSnapshotDto`.
|
||||||
|
|
||||||
## Settings columns
|
## Settings columns
|
||||||
|
|||||||
@@ -44,6 +44,36 @@ verifiziert und deshalb hier entfernt. Es bleiben die Entscheidungen, die daran
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Offene Verifikation (2026-08-27, Ticketsystem-Anbindung)
|
||||||
|
|
||||||
|
> **PAUSIERT.** `TicketSettingsTabViewModel.FeatureEnabled = false` versteckt Settings-Tab,
|
||||||
|
> Projekt-Dropdown und Kontextmenü-Eintrag; zum Reaktivieren die Konstante umlegen. Grund: die
|
||||||
|
> API ist unter `http://bandelapis.fb-tuning.local` nicht erreichbar (*connection actively
|
||||||
|
> refused* — nichts lauscht dort). Kein ClaudeDo-Bug und kein CORS; wahrscheinlich fehlt eine
|
||||||
|
> IIS-Hostname-Bindung oder der Port stimmt nicht (`deploy/deploy-iis-winrm.ps1` der API notiert,
|
||||||
|
> dass srv-04b diese Sites *by IP:port rather than by hostname* erreicht). Wird mit dem
|
||||||
|
> API-Kollegen geklärt. Die Punkte unten bleiben stehen, bis die Erreichbarkeit steht.
|
||||||
|
|
||||||
|
Tasks 1–9 sind implementiert und gemergt (Build + Tests grün, `_broadcaster.TaskUpdated` genau
|
||||||
|
einmal in `TaskStateService.cs`), aber **kein Smoke-Test gegen die echte Bandel-API ist
|
||||||
|
gelaufen**. Die fünf Punkte aus der „Manuellen Verifikation" des Specs
|
||||||
|
(`docs/superpowers/specs/2026-08-27-ticketsystem-integration-design.md`):
|
||||||
|
|
||||||
|
- [ ] PAT in den Settings hinterlegen, „Verbindung testen" → korrekter Benutzername + Scopes.
|
||||||
|
- [ ] Liste mit Projekt `393 Bandel.LagerApp` verknüpfen, „Update from Ticketsystem" → nur
|
||||||
|
eigene, offene Tickets erscheinen als Tasks.
|
||||||
|
- [ ] Einen Task laufen lassen → Ticket steht im Ticketsystem auf `InBearbeitung`.
|
||||||
|
- [ ] Approve/Merge → Ticket steht auf `Fertig`.
|
||||||
|
- [ ] Base-URL leeren → Menüeintrag verschwindet, keine Netzwerkaufrufe mehr.
|
||||||
|
|
||||||
|
**Wichtig:** die Response-Shapes der Bandel-API (`BandelEnvelope<T>`, `TicketIdentity`,
|
||||||
|
`TicketBoardItem`, `SidebarDepartment`/`SidebarProject`, `TicketDtos.cs`) wurden aus dem
|
||||||
|
**Quellcode** von `Bandel.APIs` abgeleitet, **nie live gegen die echte API verifiziert** — es gab
|
||||||
|
keinen einzigen echten Netzwerkaufruf während der Implementierung. Die Punkte 1–4 oben sind
|
||||||
|
zugleich der erste Test dieser Annahme: schlägt einer davon mit einem Deserialisierungs- oder
|
||||||
|
404/Formatfehler fehl, ist das erwartbar und kein Regressions-Bug — dann müssen die DTOs in
|
||||||
|
`src/ClaudeDo.Worker/Tickets/TicketDtos.cs` an die tatsächliche Antwort angepasst werden.
|
||||||
|
|
||||||
## Offene Verifikation (2026-07-27)
|
## Offene Verifikation (2026-07-27)
|
||||||
|
|
||||||
- **List handler (2026-07-27)** — visual pass: the Broom button is gone from the lists footer,
|
- **List handler (2026-07-27)** — visual pass: the Broom button is gone from the lists footer,
|
||||||
|
|||||||
@@ -89,9 +89,14 @@ Gilt für alle vier Gruppen:
|
|||||||
|
|
||||||
## P0 — Fundament
|
## P0 — Fundament
|
||||||
|
|
||||||
- [ ] **P0-1 — `OperationStatus` + `OperationIndicator` + Locale-Keys**
|
- [x] **P0-1 — `OperationStatus` + `OperationIndicator` + Locale-Keys**
|
||||||
- [ ] **P0-2 — Timing-Hook für die Messung**
|
- [x] **P0-2 — Timing-Hook für die Messung**
|
||||||
- [ ] **P0-3 — Regel in den CLAUDE.md-Dateien**
|
- [x] **P0-3 — Regel in den CLAUDE.md-Dateien**
|
||||||
|
|
||||||
|
> **Stand 2026-08-17.** P0, A (außer A5), B, C1 und D sind gemergt; der visuelle Pass über A und B
|
||||||
|
> ist durch, ohne Fund. Nachtrag zu P0-2: der Timing-Sink liegt seit dem Release-Vorlauf hinter
|
||||||
|
> `CLAUDEDO_OP_TIMING=1` und ist **standardmäßig aus** — die 63 `InvokeTimedAsync`-Call-Sites
|
||||||
|
> bleiben bewusst stehen. Offen: C2–C4.
|
||||||
|
|
||||||
**Vorbedingung:** keine. Muss allein landen, bevor A/B/C starten.
|
**Vorbedingung:** keine. Muss allein landen, bevor A/B/C starten.
|
||||||
|
|
||||||
@@ -189,11 +194,18 @@ MCP-Tool, das über ~5 s laufen kann, reportet Progress.
|
|||||||
|
|
||||||
## Gruppe A — Bild 1: UI-Stille
|
## Gruppe A — Bild 1: UI-Stille
|
||||||
|
|
||||||
- [ ] **A1 — Detail-Pane** ⚠️ *der gemeldete Fall*
|
- [x] **A1 — Detail-Pane** ⚠️ *der gemeldete Fall*
|
||||||
- [ ] **A2 — WorktreesOverview**
|
- [x] **A2 — WorktreesOverview**
|
||||||
- [ ] **A3 — Settings-Tabs**
|
- [x] **A3 — Settings-Tabs** — ohne OnlineInbox-SignIn, siehe Nachzügler unten
|
||||||
- [ ] **A4 — Reports und Planning-UI**
|
- [x] **A4 — Reports und Planning-UI** — ohne die beiden Planning-Calls im `DiffViewerViewModel`
|
||||||
- [ ] **A5 — Island-DB-Pfade nach Messdaten**
|
- [x] ~~**A5 — Island-DB-Pfade nach Messdaten**~~ — **abgesagt** (2026-08-13): kein DB-Pfad über
|
||||||
|
500 ms (höchster p95 372 ms), die Ausreißer saßen alle auf der Hub-Seite. Wie vorgesehen
|
||||||
|
geschlossen, ohne Code.
|
||||||
|
|
||||||
|
**Nachzügler (kein Task):** drei Locale-Keys aus P0 sind ungenutzt geblieben —
|
||||||
|
`ops.onlineInbox.signingIn` (A3), `ops.planning.buildingIntegrationBranch` und
|
||||||
|
`ops.planning.loadingAggregate` (A4). Die beiden Planning-Calls liegen in
|
||||||
|
`DiffViewerViewModel.cs`, einer Datei aus Gruppe B, die A4 nicht anfassen durfte.
|
||||||
|
|
||||||
**Vorbedingung:** P0 gemergt.
|
**Vorbedingung:** P0 gemergt.
|
||||||
|
|
||||||
@@ -274,9 +286,9 @@ bleibt unangetastet.
|
|||||||
|
|
||||||
## Gruppe B — Bild 2: UI-Freeze
|
## Gruppe B — Bild 2: UI-Freeze
|
||||||
|
|
||||||
- [ ] **B1 — `UnifiedDiffParser.Parse` auslagern**
|
- [x] **B1 — `UnifiedDiffParser.Parse` auslagern**
|
||||||
- [ ] **B2 — `DiffAlignment.Build` Grenze**
|
- [x] **B2 — `DiffAlignment.Build` Grenze**
|
||||||
- [ ] **B3 — Guard-Test gegen Dispatcher-Blockade**
|
- [x] **B3 — Guard-Test gegen Dispatcher-Blockade**
|
||||||
|
|
||||||
**Vorbedingung:** P0 gemergt (für den Indikator in B1).
|
**Vorbedingung:** P0 gemergt (für den Indikator in B1).
|
||||||
|
|
||||||
@@ -333,11 +345,21 @@ zukünftige Regressionen fangen.
|
|||||||
|
|
||||||
## Gruppe C — Bild 3: Worker-Stille
|
## Gruppe C — Bild 3: Worker-Stille
|
||||||
|
|
||||||
- [ ] **C1 — generischer `OperationProgress`-Kanal**
|
- [x] **C1 — generischer `OperationProgress`-Kanal**
|
||||||
- [ ] **C2 — Startup-Recovery sichtbar**
|
- [ ] **C2 — Startup-Recovery sichtbar**
|
||||||
- [ ] **C3 — Worktree-Anlage sichtbar**
|
- [ ] **C3 — Worktree-Anlage sichtbar**
|
||||||
- [ ] **C4 — Rebase-after-Merge und WorktreeMaintenance**
|
- [ ] **C4 — Rebase-after-Merge und WorktreeMaintenance**
|
||||||
- [ ] **C5 — periodische Dienste**
|
- [x] ~~**C5 — periodische Dienste**~~ — **abgesagt** (2026-08-21): Usage/Prime/OnlineSync
|
||||||
|
melden Aktivität schon über bestehende Broadcasts (`UsageUpdated`,
|
||||||
|
`PrimeFired`/`PrepStarted`/`PrepLine`/`PrepFinished`, `TaskUpdated` bei neuen Online-Tasks);
|
||||||
|
Fehler aller vier Dienste laufen automatisch über `BroadcastLogSink` in den WorkerLog-Footer.
|
||||||
|
`QueueService` meldet seine einzigen bedeutsamen Zustandswechsel (Gate/Throttle) bereits
|
||||||
|
change-gated über `WorkerLog`. Ein zusätzlicher `OperationProgress`-Kanal wäre Duplikat statt
|
||||||
|
Mehrwert, mit echtem Tick-Strom-Risiko am Backstop-Timer.
|
||||||
|
|
||||||
|
> **Einzige offene Gruppe.** C2–C4 sind unblockiert (C1 ist gemergt, C5 abgesagt). Woran man den Reststand
|
||||||
|
> erkennt: die vier Keys `ops.worker.startupRecovery`, `.creatingWorktree`, `.rebasingAfterMerge`
|
||||||
|
> und `.maintainingWorktrees` liegen ungenutzt in beiden Sprachdateien.
|
||||||
|
|
||||||
**Vorbedingung:** P0 gemergt. Die Abhängigkeit zur Parallelsession ist mit `cad0582`
|
**Vorbedingung:** P0 gemergt. Die Abhängigkeit zur Parallelsession ist mit `cad0582`
|
||||||
aufgelöst.
|
aufgelöst.
|
||||||
@@ -418,10 +440,14 @@ Anzeige-Rauschen erzeugt, **weglassen und begründen** statt durchziehen.
|
|||||||
|
|
||||||
## Gruppe D — Bild 4: MCP-Stille
|
## Gruppe D — Bild 4: MCP-Stille
|
||||||
|
|
||||||
- [ ] **D1 — `ProgressReporter` extrahieren**
|
- [x] **D1 — `ProgressReporter` extrahieren**
|
||||||
- [ ] **D2 — die 8 `batch_*`-Tools**
|
- [x] **D2 — die `batch_*`-Tools** — es sind **sieben**, nicht acht (die Achterzahl unten war ein
|
||||||
- [ ] **D3 — Worktree- und Diff-Tools**
|
Zählfehler beim Schreiben des Plans)
|
||||||
- [ ] **D4 — Rest und Doku-Regel**
|
- [x] **D3 — Worktree- und Diff-Tools** — drei davon; `batch_cleanup_task_worktrees` lief über D2
|
||||||
|
- [x] **D4 — Rest und Doku-Regel** — fand zwei echte Lücken, die D1–D3 offen gelassen hatten:
|
||||||
|
`continue_merge` reichte sein Progress-Token nicht ins Post-Merge-Verify-Gate, und der
|
||||||
|
Unit-Merge-Drain im `PlanningMergeOrchestrator` verlor es nach dem ersten Tick. Dazu
|
||||||
|
`list_worktrees`.
|
||||||
|
|
||||||
**Vorbedingung:** keine. Kann sofort starten, parallel zu P0.
|
**Vorbedingung:** keine. Kann sofort starten, parallel zu P0.
|
||||||
|
|
||||||
@@ -438,7 +464,7 @@ Anzeige-Rauschen erzeugt, **weglassen und begründen** statt durchziehen.
|
|||||||
die Progress-Schleife an. Wenn beide Gruppen gleichzeitig laufen, ist das die Stelle, die der
|
die Progress-Schleife an. Wenn beide Gruppen gleichzeitig laufen, ist das die Stelle, die der
|
||||||
Merge-Helper im Auge behalten muss.
|
Merge-Helper im Auge behalten muss.
|
||||||
- **Keine Locale-Keys** (Nachbesserung 3). Englische Klartext-Strings.
|
- **Keine Locale-Keys** (Nachbesserung 3). Englische Klartext-Strings.
|
||||||
- **Zielumfang:** die 8 `batch_*`-Tools mit `i/n`, dann `cleanup_task_worktree`,
|
- **Zielumfang:** die 7 `batch_*`-Tools mit `i/n`, dann `cleanup_task_worktree`,
|
||||||
`batch_cleanup_task_worktrees`, `get_task_diff`, `preview_merge_set`. Bereits versorgt und
|
`batch_cleanup_task_worktrees`, `get_task_diff`, `preview_merge_set`. Bereits versorgt und
|
||||||
nicht anzufassen: die 5 Tools in `ExternalMcpService` mit `IProgress`, `TaskWaitMcpTools`,
|
nicht anzufassen: die 5 Tools in `ExternalMcpService` mit `IProgress`, `TaskWaitMcpTools`,
|
||||||
`merge_task`/`review_task`.
|
`merge_task`/`review_task`.
|
||||||
@@ -461,7 +487,7 @@ anfassen.
|
|||||||
*Dateien:* `Worker/Lifecycle/TaskMergeService.cs`, neue Klasse im Worker-Projekt
|
*Dateien:* `Worker/Lifecycle/TaskMergeService.cs`, neue Klasse im Worker-Projekt
|
||||||
*Fertig wenn:* Der Merge-Pfad nutzt die extrahierte Klasse, Verhalten unverändert, bestehende Merge-Tests grün.
|
*Fertig wenn:* Der Merge-Pfad nutzt die extrahierte Klasse, Verhalten unverändert, bestehende Merge-Tests grün.
|
||||||
|
|
||||||
**D2 · Die acht `batch_*`-Tools mit Element-Fortschritt**
|
**D2 · Die sieben `batch_*`-Tools mit Element-Fortschritt**
|
||||||
Jedes `batch_*`-Tool reportet pro verarbeitetem Element. Grund: ohne Meldung bricht der
|
Jedes `batch_*`-Tool reportet pro verarbeitetem Element. Grund: ohne Meldung bricht der
|
||||||
MCP-Client nach 300 s Stille ab, während der Worker weiterläuft — genau der Mechanismus, der
|
MCP-Client nach 300 s Stille ab, während der Worker weiterläuft — genau der Mechanismus, der
|
||||||
einen Merge durchlaufen lässt, den Task aber nie auf `Done` bringt.
|
einen Merge durchlaufen lässt, den Task aber nie auf `Done` bringt.
|
||||||
@@ -486,9 +512,9 @@ Tool.
|
|||||||
|
|
||||||
## Was nach allen vier Gruppen offen bleibt
|
## Was nach allen vier Gruppen offen bleibt
|
||||||
|
|
||||||
- **Visuelle Prüfung** für alle Pakete in A und B — der Nutzer, nicht ein Agent.
|
- ~~**Visuelle Prüfung** für alle Pakete in A und B~~ — **am 2026-08-17 durch**, ohne Fund
|
||||||
- **Auswertung von P0-2** steuert A5 und die Feinheiten in C. Vorher ist A5 absichtlich
|
(Worktrees-Übersicht, Settings/Skill-Install, WeeklyReport, großer Diff, Detail-Pane-Approve).
|
||||||
unbestimmt.
|
- ~~**Auswertung von P0-2**~~ — am 2026-08-13 ausgewertet, siehe A5.
|
||||||
- **`MergeProgressEvent`-Forwarder entfernen**, sobald A und C beide gemergt sind. Ein
|
- **`MergeProgressEvent`-Forwarder entfernen**, sobald A und C beide gemergt sind. Ein
|
||||||
Aufräum-Task, kein Paket.
|
Aufräum-Task, kein Paket.
|
||||||
- **Bewusst nicht gebaut:** Cancel, Footer-Anzeige für laufende Operationen, Prozentbalken,
|
- **Bewusst nicht gebaut:** Cancel, Footer-Anzeige für laufende Operationen, Prozentbalken,
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
# UX-Struktur — Vorgaben für die Umsetzung
|
||||||
|
|
||||||
|
**Design:** `docs/superpowers/specs/2026-08-20-ux-struktur-design.md`. Dort stehen die
|
||||||
|
Entscheidungen und Belege; dieses Dokument wiederholt sie nicht, es schneidet die Arbeit.
|
||||||
|
|
||||||
|
**Ausführungsmodell: eine strikte Kette.** Alle drei Pakete ändern `locales/en.json` und
|
||||||
|
`locales/de.json` — die überlappen immer. Deshalb läuft nichts parallel.
|
||||||
|
|
||||||
|
```
|
||||||
|
#189 → #190 → #191 → #192 (mechanische Audit-Fixes, bereits delegiert)
|
||||||
|
│
|
||||||
|
└── A Task-Zeile + Kontextmenü
|
||||||
|
│
|
||||||
|
└── B Settings-Sidebar
|
||||||
|
│
|
||||||
|
└── C Erststart-Banner + Textkette
|
||||||
|
```
|
||||||
|
|
||||||
|
Jedes Paket hängt per `dependsOn` am Vorgänger. Der Picker holt es erst, wenn der Vorgänger
|
||||||
|
**Done** (also gemergt) ist.
|
||||||
|
|
||||||
|
## Datei-Eigentum (bindend)
|
||||||
|
|
||||||
|
| Paket | Besitzt | Darf **nicht** anfassen |
|
||||||
|
|---|---|---|
|
||||||
|
| **A** | `Ui/Views/Islands/TaskRowView.axaml(.cs)`, `Ui/ViewModels/Islands/TaskRowViewModel.cs`, `Ui/Views/Islands/Detail/TaskHeaderBar.axaml`, `locales/*` | `WorkConsole.axaml`, Settings-Dateien, `ListsIsland*` |
|
||||||
|
| **B** | `Ui/Views/Modals/SettingsModalView.axaml(.cs)`, `Ui/ViewModels/Modals/SettingsModalViewModel.cs`, `Ui/ViewModels/Modals/Settings/*`, `locales/*` | alles im Islands-Ordner |
|
||||||
|
| **C** | `Ui/Views/Islands/ListsIslandView.axaml(.cs)`, `Ui/ViewModels/Islands/ListsIslandViewModel.cs`, `Ui/Views/Islands/Detail/WorkConsole.axaml` (nur die eine Approve-Gate-Zeile), `Ui/Views/Islands/TasksIslandView.axaml` (nur Empty-State-Texte aus #192 nachschärfen), `locales/*` | `TaskRowView*`, Settings-Dateien |
|
||||||
|
|
||||||
|
Alle drei dürfen `tests/ClaudeDo.Ui.Tests` erweitern — aber nur eigene neue Testdateien bzw.
|
||||||
|
eigene neue Testmethoden anlegen, keine fremden umschreiben.
|
||||||
|
|
||||||
|
## Vorgaben für alle drei Pakete
|
||||||
|
|
||||||
|
- **Modell:** `sonnet`. **`maxTurns` explizit 200** — `model_presets` ist NULL, sonst gibt es
|
||||||
|
30 Turns und „exited with code 1 and no result".
|
||||||
|
- **Bauen** (`.slnx` scheitert auf .NET 8, laufender Worker sperrt `Debug`):
|
||||||
|
```
|
||||||
|
dotnet build src/ClaudeDo.App/ClaudeDo.App.csproj -c Release
|
||||||
|
dotnet test tests/ClaudeDo.Ui.Tests/ClaudeDo.Ui.Tests.csproj -c Release
|
||||||
|
dotnet test tests/ClaudeDo.Localization.Tests/ClaudeDo.Localization.Tests.csproj -c Release
|
||||||
|
```
|
||||||
|
- **Nur eigene Dateien stagen** (`git commit -- <pfade>`), nie `git add -A` — der `main`-Checkout
|
||||||
|
ist mit parallelen Sessions geteilt.
|
||||||
|
- **Keine Funktion still entfernen.** Wo etwas aus einer Oberfläche verschwindet, im
|
||||||
|
Abschlussbericht benennen, wo es jetzt liegt.
|
||||||
|
- **Locale-Parity** ist Testsache (Localization.Tests) — beide Dateien im gleichen Commit.
|
||||||
|
- **Visuelle Verifikation im Abschlussbericht als offen markieren.** Mika macht den visuellen
|
||||||
|
Pass; kein Task darf behaupten, die UI sei geprüft.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Paket A — Task-Zeile + Kontextmenü
|
||||||
|
|
||||||
|
Themen 1 und 3 des Designs zusammen, weil sie dieselben drei Dateien anfassen.
|
||||||
|
|
||||||
|
- [ ] **A1 Kontextmenü umbauen.** Gruppe 1 (Send to queue, Remove from queue, Cancel execution,
|
||||||
|
Open quick session, Refine task) immer sichtbar, bei nicht erfüllter Bedingung
|
||||||
|
`IsEnabled=false` + Grund. Untermenüs „Mark as", „Planning", „Schedule" nach der Tabelle im
|
||||||
|
Design; Untermenü-Kopf disabled wenn leer. Der „Delete task…"-Eintrag aus #191 bleibt als
|
||||||
|
abgesetzte Gruppe unten. `MakeItem` bekommt einen `reason`-Parameter.
|
||||||
|
- [ ] **A2 Disabled-Gründe am VM.** `SendToQueueDisabledReason`, `CancelDisabledReason`,
|
||||||
|
`QuickSessionDisabledReason`, `RefineDisabledReason`, `PlanningDisabledReason` (`string?`)
|
||||||
|
auf `TaskRowViewModel`, mit Change-Notification an den passenden Stellen. Unit-Tests pro
|
||||||
|
Zustand.
|
||||||
|
- [ ] **A3 Tooltip-Fähigkeit verifizieren.** Headless prüfen, ob Avalonia 12 einen `ToolTip` auf
|
||||||
|
einem `IsEnabled=false` MenuItem anzeigt. Ja → Tooltip. Nein → Grund als Suffix im Header.
|
||||||
|
Das Ergebnis gehört in den Abschlussbericht (es ist eine Projekt-Erkenntnis, kein Detail).
|
||||||
|
- [ ] **A4 Hover-/Selektions-Aktionen.** `IsHovered` + `ShowRowActions => IsHovered || IsSelected`
|
||||||
|
am `TaskRowViewModel`; `PointerEntered`/`PointerExited` in `TaskRowView.axaml.cs`.
|
||||||
|
Refine-Button, ungesetzter Star und Dequeue-X werden damit AND-verknüpft; `IsRefining`-Spinner
|
||||||
|
bleibt ausgenommen. Grid-Spalten unverändert lassen, damit die Zeile nicht springt.
|
||||||
|
- [ ] **A5 Branch verlagern.** Branch-Chip aus `TaskRowView.axaml` entfernen und den Branch-Namen
|
||||||
|
in `TaskHeaderBar.axaml` als Meta-Zeile aufnehmen (er steht bisher nirgends im Detail-Pane).
|
||||||
|
Ohne A5 darf der Chip nicht entfernt werden.
|
||||||
|
|
||||||
|
**Fertig, wenn:** Build grün, Ui.Tests + Localization.Tests grün, und der Bericht sagt für jedes
|
||||||
|
verschwundene Zeilen-Element, wo es jetzt erreichbar ist.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Paket B — Settings-Sidebar
|
||||||
|
|
||||||
|
- [ ] **B1 Host umbauen.** TabStrip des bestehenden `TabControl` ausblenden, links eine
|
||||||
|
Sidebar-`ListBox` mit Gruppen-Labels BASIS/ERWEITERT, die `SelectedIndex` bindet.
|
||||||
|
Panel-Inhalte bleiben, wo sie sind. Fensterbreite 580 → 700.
|
||||||
|
`SettingsCategory(Key, Label, Group, IsVisible, RequiresRepo)` + `Categories` +
|
||||||
|
`SelectedCategory` am `SettingsModalViewModel`.
|
||||||
|
- [ ] **B2 General aufteilen.** „Allgemein" (Sprache, Accent, Default-Instructions) und
|
||||||
|
„Ausführung" (Model, Permission, Model-Presets, MaxTurns-Ceiling, Parallelität, Usage-Gate).
|
||||||
|
Kategorie „Berichte" neu mit Standup-Wochentag + Report-Excluded-Paths. Reihenfolge der
|
||||||
|
Kategorien: Allgemein, Ausführung, Prime Claude | Worktrees, Dateien & Prompts,
|
||||||
|
Session Skills, Berichte, Online Inbox.
|
||||||
|
- [ ] **B3 Session Skills zusammenlegen.** Checkbox-Liste aus General entfernen; in der Kategorie
|
||||||
|
„Session Skills" pro installiertem Skill eine Zeile mit Checkbox (global aktiv) +
|
||||||
|
Update/Remove, darunter das Install-Feld. **Speichern/Laden der Auswahl muss nachweislich
|
||||||
|
unverändert funktionieren** — Test dafür ist Pflicht, das ist die einzige echte
|
||||||
|
Regressionsstelle des Pakets.
|
||||||
|
- [ ] **B4 Repo-Hinweis.** `HasLinkedRepo` am `SettingsModalViewModel` (keine Liste mit
|
||||||
|
`WorkingDir` → false). Hinweisstreifen oben in Worktrees, Prime Claude, Session Skills und
|
||||||
|
Berichte: „Wirkt erst mit verknüpftem Repo" + Link, der den Repo-Import öffnet.
|
||||||
|
|
||||||
|
**Fertig, wenn:** Build grün, Tests grün, jede der acht Kategorien einmal aufrufbar, und Save →
|
||||||
|
Reopen zeigt alle Werte unverändert (inkl. Skill-Auswahl).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Paket C — Erststart-Banner + Textkette
|
||||||
|
|
||||||
|
- [ ] **C1 Banner.** `HasNoLinkedRepo` am `ListsIslandViewModel` (true, solange keine User-Liste
|
||||||
|
ein `WorkingDir` hat; neu berechnet beim Listen-Load und nach List-CRUD/List-Settings-Save).
|
||||||
|
Banner unter dem Lists-Island-Header, optisch wie das Update-Banner des Shells, Button ruft
|
||||||
|
`OpenRepoImportCommand`. Kein Dismiss.
|
||||||
|
- [ ] **C2 Textkette abstimmen.** Die Empty-State-Texte aus #192 so nachschärfen, dass Banner →
|
||||||
|
„Liste ohne Repo" → „Liste mit Repo, aber leer" als ein Weg lesbar sind; der letzte nennt
|
||||||
|
„Send to queue" und den Worktree.
|
||||||
|
- [ ] **C3 Review-Zeile.** Am Approve-Gate-Hinweis in `WorkConsole.axaml` (den #190 baut) eine
|
||||||
|
Zeile ergänzen, die sagt, dass Approve gleichzeitig das Mergen der ganzen Einheit ist.
|
||||||
|
Nur diese eine Stelle in der Datei anfassen.
|
||||||
|
|
||||||
|
**Fertig, wenn:** Build grün, Tests grün, und die vier Texte im Bericht als zusammenhängende
|
||||||
|
Kette zitiert sind (damit Mika sie ohne App lesen kann).
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,227 @@
|
|||||||
|
# UX-Struktur: Kontextmenü, Settings, Task-Zeile, Erststart — Design
|
||||||
|
|
||||||
|
**Stand:** 2026-08-20 · Codestand `f9a8ed7` · Freigegeben von Mika im Brainstorming
|
||||||
|
|
||||||
|
Die vier strukturellen Themen aus dem UX-Audit vom 2026-08-20. Die *mechanischen* Befunde
|
||||||
|
desselben Audits laufen bereits als Tasks **#189** (Silent No-Ops → Footer-Fehler), **#190**
|
||||||
|
(Precondition-Hinweise), **#191** (Aktions-/Bestätigungs-Konsistenz), **#192** (Empty States).
|
||||||
|
Dieses Design setzt auf deren Ergebnis auf und wiederholt es nicht.
|
||||||
|
|
||||||
|
**Was hier nicht drinsteht:** die Audit-Befunde selbst (Memory `ux_audit_2026_08_20.md`) und die
|
||||||
|
Mechanik von Review/Merge (`docs/explore-notes/review-merge.md`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Gemeinsame Randbedingungen
|
||||||
|
|
||||||
|
- Alle drei Umsetzungs-Tasks laufen **nach #192**. Sie fassen dieselben Views an, und #189–#192
|
||||||
|
ändern Locale-Dateien, `TaskRowView.axaml.cs`, `DetailsIslandViewModel` und die Empty-State-Keys.
|
||||||
|
- **Keine Funktion verschwindet still.** Wo etwas aus einer Oberfläche verschwindet, muss dieses
|
||||||
|
Design sagen, wo es stattdessen erreichbar ist — und der Task muss das belegen.
|
||||||
|
- Neue Texte immer als Keys in `locales/en.json` **und** `locales/de.json` (Localization.Tests
|
||||||
|
erzwingt Parity).
|
||||||
|
- Visuelle Verifikation macht Mika. Jeder Task markiert sie im Abschlussbericht als offen.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Task-Kontextmenü restrukturieren
|
||||||
|
|
||||||
|
**Problem.** `TaskRowView.axaml.cs` baut ~18 flache MenuItems mit vier Separatoren. Kernaktionen
|
||||||
|
(Queue rein/raus, Abbrechen) stehen visuell gleichwertig neben Planning-Session-Lifecycle und
|
||||||
|
My-Day-Verwaltung. Zusätzlich werden Einträge bei nicht erfüllter Bedingung komplett ausgeblendet
|
||||||
|
— das Menü hat je Zustand ein anderes Layout, und der User erfährt nie, dass eine Aktion
|
||||||
|
existiert.
|
||||||
|
|
||||||
|
**Entscheidung: gruppieren und verschachteln.** Das Menü bleibt die vollständige Action-Surface
|
||||||
|
für einen Task (keine Verlagerung ins Detail-Pane — das ist selbst schon dicht).
|
||||||
|
|
||||||
|
```
|
||||||
|
Send to queue [disabled + Grund]
|
||||||
|
Remove from queue [disabled + Grund]
|
||||||
|
Cancel execution [disabled + Grund]
|
||||||
|
Open quick session [disabled + Grund]
|
||||||
|
Refine task [disabled + Grund] ← neu (siehe Thema 3)
|
||||||
|
─────────────────────────────
|
||||||
|
Mark as ▸ Done · Cancelled · ─ · Mark manual / Mark as Claude task
|
||||||
|
Planning ▸ Open · Resume · Finalize · Discard
|
||||||
|
Schedule ▸ Schedule for… · Clear schedule · ─ · Add to My Day / Remove from My Day
|
||||||
|
─────────────────────────────
|
||||||
|
Delete task… (aus #191, bleibt unten abgesetzt)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Sichtbarkeitsregeln.**
|
||||||
|
|
||||||
|
| Ebene | Regel |
|
||||||
|
|---|---|
|
||||||
|
| Gruppe 1 (5 Einträge) | **Immer sichtbar**, Position fix. Bedingung nicht erfüllt → `IsEnabled=false` + Grund. |
|
||||||
|
| Untermenü-Einträge | Heutige Ausblende-Logik bleibt — die Auswahl ist dort exklusiv (Manual ⇄ Claude-Task, Add ⇄ Remove My Day). |
|
||||||
|
| Untermenü-Kopf | `IsEnabled=false`, wenn er leer wäre (z.B. „Planning" auf einem Manual-Task). |
|
||||||
|
| Delete | Wie #191 es baut, nur eigene Gruppe unten. |
|
||||||
|
|
||||||
|
**Grund-Anzeige.** Primär `ToolTip.Tip` am disabled MenuItem. **Verifikationspflicht:** Der Task
|
||||||
|
muss headless prüfen, ob Avalonia 12 Tooltips auf `IsEnabled=false` MenuItems überhaupt anzeigt.
|
||||||
|
Wenn nicht → Grund als Suffix im Header (`"Send to queue — kein Repo verknüpft"`). Kein
|
||||||
|
stillschweigendes Weglassen; wenn beides nicht geht, muss der Task es als Befund melden.
|
||||||
|
|
||||||
|
**Wo die Gründe herkommen.** Neue berechnete Properties auf `TaskRowViewModel` neben den
|
||||||
|
bestehenden `CanX`, z.B. `SendToQueueDisabledReason`, `CancelDisabledReason`,
|
||||||
|
`QuickSessionDisabledReason`, `RefineDisabledReason`, `PlanningDisabledReason` (jeweils `string?`,
|
||||||
|
`null` = kein Grund nötig). Keine Bedingungslogik in der View.
|
||||||
|
|
||||||
|
**Struktur im Code.** Das Menü wird weiterhin erst beim Öffnen gebaut (kein Rendering-Overhead
|
||||||
|
pro Zeile). `MakeItem` bekommt einen optionalen `reason`-Parameter und schaltet auf `IsEnabled`
|
||||||
|
statt `IsVisible` um, wenn der Aufrufer das verlangt.
|
||||||
|
|
||||||
|
**Ergebnis:** 18 flache Einträge → 9 Top-Level-Zeilen, davon 5 mit fixer Position.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Settings-Modal entzerren
|
||||||
|
|
||||||
|
**Problem.** Der General-Tab mischt 10+ Konzeptgruppen (Sprache, Accent, Default-Instructions,
|
||||||
|
Model, Permission, Model-Presets-Tabelle, MaxTurns-Ceiling, Parallelität, Usage-Gate-Prozente,
|
||||||
|
Report-Excluded-Paths, Standup-Wochentag, Session-Skills-Checkboxen). Session Skills stehen
|
||||||
|
**doppelt** (Auswahl in General, Verwaltung im Skills-Tab). Und die sechs Tabs füllen den
|
||||||
|
580 px breiten TabStrip bereits aus — ein siebter passt nicht.
|
||||||
|
|
||||||
|
**Entscheidung: Sidebar-Navigation mit zwei Gruppen.**
|
||||||
|
|
||||||
|
```
|
||||||
|
┌ Einstellungen ─────────────────────────────────────────┐
|
||||||
|
│ BASIS │ [Panel der gewählten Kategorie] │
|
||||||
|
│ Allgemein │ │
|
||||||
|
│ Ausführung │ │
|
||||||
|
│ Prime Claude │ │
|
||||||
|
│ │ │
|
||||||
|
│ ERWEITERT │ │
|
||||||
|
│ Worktrees │ │
|
||||||
|
│ Dateien & Prompts │ │
|
||||||
|
│ Session Skills │ │
|
||||||
|
│ Berichte │ │
|
||||||
|
│ Online Inbox │ (nur wenn ShowOnlineInbox) │
|
||||||
|
└────────────────────┴───────────────────────────────────┘
|
||||||
|
[Abbrechen] [Speichern]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Kategorien-Inhalt.**
|
||||||
|
|
||||||
|
| Kategorie | Inhalt | Herkunft |
|
||||||
|
|---|---|---|
|
||||||
|
| Allgemein | Sprache, Accent-Preset, Default-Claude-Instructions | General |
|
||||||
|
| Ausführung | Default-Model, Permission-Mode, Model-Presets-Tabelle, MaxTurns-Ceiling, Max parallele Ausführungen, Usage-Gate (5h/7d %) | General |
|
||||||
|
| Prime Claude | Schedules + Daily-Prep-Max-Tasks | unverändert |
|
||||||
|
| Worktrees | Strategie, Root, Auto-Cleanup, Cleanup-/Reset-Aktionen | unverändert |
|
||||||
|
| Dateien & Prompts | Agents-Restore, Prompt-Pfade, Customized-Prompts | unverändert (Files) |
|
||||||
|
| Session Skills | **zusammengelegt**: je installierter Skill eine Zeile mit Checkbox (global aktiv) + Update/Remove; darunter Install-URL | Skills-Tab + Checkbox-Liste aus General |
|
||||||
|
| Berichte | Standup-Wochentag, Report-Excluded-Paths | General (neu herausgelöst) |
|
||||||
|
| Online Inbox | unverändert, weiter an `ShowOnlineInbox` gekoppelt | unverändert |
|
||||||
|
|
||||||
|
**Session-Skills-Zusammenlegung.** Die Checkbox-Liste im General-Tab entfällt. Beide VMs
|
||||||
|
(`GeneralSettingsTabViewModel.SessionSkills`, `SessionSkillsSettingsTabViewModel`) speisen künftig
|
||||||
|
**eine** Liste; die Auswahl (global aktive Skills) wird weiterhin über denselben Pfad gespeichert
|
||||||
|
wie heute. Der Task muss belegen, dass Speichern/Laden der Auswahl unverändert funktioniert —
|
||||||
|
das ist die einzige Stelle mit echtem Regressionsrisiko.
|
||||||
|
|
||||||
|
**Repo-Hinweis statt Verstecken.** Nichts wird ausgeblendet (verschwindende Einstellungen
|
||||||
|
irritieren in einem Power-Tool mehr als Dichte). Stattdessen zeigen **Worktrees, Prime Claude,
|
||||||
|
Session Skills und Berichte** oben einen Hinweisstreifen, solange keine Liste ein `WorkingDir`
|
||||||
|
hat: *„Wirkt erst mit verknüpftem Repo"* + Link, der den Repo-Import öffnet. Dafür eine neue
|
||||||
|
Property `HasLinkedRepo` am `SettingsModalViewModel`.
|
||||||
|
|
||||||
|
**Umsetzung risikoarm.** Das `TabControl` **bleibt** als Content-Host: nur der TabStrip wird
|
||||||
|
ausgeblendet, und eine Sidebar-`ListBox` bindet `SelectedIndex`. Die vorhandenen Panel-Inhalte
|
||||||
|
wandern damit nahezu unverändert mit (General wird gesplittet, Skills gemerged, Berichte neu).
|
||||||
|
Keine Neuschrift der 556 AXAML-Zeilen, compiled bindings bleiben intakt. Sidebar-Modell:
|
||||||
|
`SettingsCategory(Key, Label, Group, IsVisible, RequiresRepo)` in `SettingsModalViewModel.Categories`.
|
||||||
|
Fensterbreite 580 → 700.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. TaskRow-Dichte
|
||||||
|
|
||||||
|
**Problem.** Eine Zeile kann 16 Elemente zeigen. Die Maximaldichte trifft real fast nur einen
|
||||||
|
`WaitingForReview`-Task in einer Smart-List (Status-, List-, Branch-, Diff-Chip plus Icons und
|
||||||
|
Buttons) — aber genau dort ist die Zeile am schwersten zu lesen.
|
||||||
|
|
||||||
|
**Entscheidung: Zustand bleibt, Aktionen auf Hover-oder-Selektion, reine Metadaten raus.**
|
||||||
|
|
||||||
|
| Klasse | Elemente |
|
||||||
|
|---|---|
|
||||||
|
| **Immer sichtbar (Zustand)** | Chevron (Planning-Parent), Done-Toggle, `#Nummer`, Titel, die vier Badges (DRAFT/PLANNED/Planning/MANUAL), Roadblock-Icon, Agent-Suggested-Icon, Status-Chip (bleibt tappbar → Mission Control), Diff-Chip, List-Chip (nur Smart-Lists, wie heute), Chain-Chip/Chain-Step-Badge, **gesetzter** Star |
|
||||||
|
| **Hover ODER Selektion (Aktion)** | Refine-Button, **ungesetzter** Star, Dequeue-X |
|
||||||
|
| **Aus der Zeile raus** | Branch-Chip |
|
||||||
|
|
||||||
|
**Kein Funktionsverlust.** Refine, Star und Dequeue bleiben über das Kontextmenü erreichbar —
|
||||||
|
„Remove from queue" existiert dort, „Refine task" wird in Thema 1 neu ergänzt. Selektion als
|
||||||
|
zweiter Trigger deckt Tastaturbedienung ab.
|
||||||
|
|
||||||
|
**Ausnahme.** Der Refine-**Spinner** (`IsRefining`) bleibt immer sichtbar. Ein laufender Refine
|
||||||
|
darf nicht verschwinden, wenn die Maus die Zeile verlässt.
|
||||||
|
|
||||||
|
**Branch-Chip: Verlagerung, nicht Löschung.** Der Branch-Name steht heute **nirgends** im
|
||||||
|
Detail-Pane (geprüft gegen `DetailsIslandView.axaml` und `Views/Islands/Detail/*.axaml` —
|
||||||
|
kein Treffer außer der Merge-Target-ComboBox). Er muss deshalb im selben Task in die
|
||||||
|
`TaskHeaderBar` als Meta-Zeile aufgenommen werden. `WorkConsole.axaml` fasst dieser Task
|
||||||
|
**nicht** an (Datei-Eigentum, siehe Plan).
|
||||||
|
|
||||||
|
**Umsetzung.** `TaskRowViewModel` bekommt `IsHovered` (gesetzt über `PointerEntered`/
|
||||||
|
`PointerExited` in `TaskRowView.axaml.cs`) und ein berechnetes
|
||||||
|
`ShowRowActions => IsHovered || IsSelected`. Die neuen Sichtbarkeiten sind **AND**-Verknüpfungen
|
||||||
|
mit den bestehenden `CanRefine` / `CanRemoveFromQueue` / `IsStarred` — keine bestehende Bedingung
|
||||||
|
wird ersetzt. Layout-Sprünge vermeiden: die Buttons behalten ihre Grid-Spalten
|
||||||
|
(`Auto,Auto,32`), es wechselt nur die Sichtbarkeit innerhalb fester Breite.
|
||||||
|
|
||||||
|
**Ergebnis:** Worst case ohne Hover 16 → 9 Elemente.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Erststart
|
||||||
|
|
||||||
|
**Problem.** Nach dem Seeding existieren nur My Day / Important / Planned und kein Repo. Es gibt
|
||||||
|
kein Onboarding; die Empty States aus #192 beschreiben den Ist-Zustand, aber nicht die Reihenfolge
|
||||||
|
Repo → Liste → Task → Queue → Review.
|
||||||
|
|
||||||
|
**Entscheidung: kein Onboarding-Konstrukt.** Ein zustandsgetriebenes Banner plus eine abgestimmte
|
||||||
|
Textkette. Explizit **kein** Wizard, **kein** Willkommens-Modal, **kein** Onboarding-Zustand in
|
||||||
|
DB oder Config.
|
||||||
|
|
||||||
|
**Banner** im Lists-Island direkt unter dem Header, optisch wie das bestehende Update-Banner des
|
||||||
|
Shells (kein neues Stil-Vokabular):
|
||||||
|
|
||||||
|
```
|
||||||
|
┌──────────────────────────────────────────────┐
|
||||||
|
│ Noch kein Repo verknüpft. ClaudeDo führt │
|
||||||
|
│ Tasks in einem Git-Repo aus. │
|
||||||
|
│ [ Repo importieren ] │
|
||||||
|
└──────────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
- Sichtbar, solange **keine User-Liste ein `WorkingDir` hat**. Neue Property `HasNoLinkedRepo`
|
||||||
|
am `ListsIslandViewModel`, neu berechnet beim Listen-Load und nach List-CRUD /
|
||||||
|
List-Settings-Save.
|
||||||
|
- **Kein Dismiss, kein persistierter Zustand.** Wer sein einziges Repo entfernt, bekommt den Weg
|
||||||
|
zurück wieder gezeigt.
|
||||||
|
- Der Button ruft das vorhandene `OpenRepoImportCommand` (dritter Einstieg neben dem Header-Button
|
||||||
|
und `Menü → Add repos`).
|
||||||
|
|
||||||
|
**Textkette.** Die Stellen müssen als ein Weg lesbar sein. Die Keys aus #192 existieren zu diesem
|
||||||
|
Zeitpunkt schon und werden nur nachgeschärft:
|
||||||
|
|
||||||
|
1. Banner → *Repo importieren*
|
||||||
|
2. Task-Liste leer, Liste **ohne** Repo (#192) → *Diese Liste hat kein Repo; in den List-Settings
|
||||||
|
verknüpfen*
|
||||||
|
3. Task-Liste leer, Liste **mit** Repo (#192) → *Task anlegen, dann Rechtsklick → „Send to queue" —
|
||||||
|
Claude arbeitet ihn in einem eigenen Worktree ab*
|
||||||
|
4. Review-Stufe: am Approve-Gate-Hinweis (den #190 in `WorkConsole.axaml` baut) **eine** Zeile
|
||||||
|
ergänzen, die sagt, dass Approve gleichzeitig das Mergen ist.
|
||||||
|
|
||||||
|
Punkt 3 erklärt die Queue genau dort, wo der erste Task entsteht. Punkt 4 schließt die Lücke,
|
||||||
|
dass der erste fertige Run in einem Zustand landet, den nichts ankündigt.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Nicht Teil dieses Designs
|
||||||
|
|
||||||
|
- Der WorkConsole-Git-Tab (laut Audit das dichteste Panel der App) — eigenes Thema.
|
||||||
|
- Mission Control und der Diff-Viewer.
|
||||||
|
- Alles, was #189–#192 schon abdecken.
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
# Prime Claude: per-schedule action kind
|
||||||
|
|
||||||
|
**Date:** 2026-08-24
|
||||||
|
**Status:** approved
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
`PrimeRunner.FireAsync` is hardcoded to one action: build `DailyPrepPrompt`, run `claude -p`
|
||||||
|
with the two MyDay MCP tools, let Claude fill MyDay. A Prime schedule is therefore always a
|
||||||
|
"fill my day" run, even when all the user wants is to open the usage window, or to run some
|
||||||
|
other recurring instruction.
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Each Prime schedule picks one of three actions:
|
||||||
|
|
||||||
|
| Kind | What it does |
|
||||||
|
|---|---|
|
||||||
|
| `Ping` | Fires one throwaway `claude -p` turn to open the usage window. Nothing else. **Default for new schedules.** |
|
||||||
|
| `FillMyDay` | Today's behaviour: daily-prep prompt, MyDay selection capped by `DailyPrepMaxTasks`. |
|
||||||
|
| `Custom` | Runs the schedule's own prompt with the ClaudeDo MCP tools available. |
|
||||||
|
|
||||||
|
## Data
|
||||||
|
|
||||||
|
New enum in `ClaudeDo.Data.Models`:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
public enum PrimeActionKind { Ping = 0, FillMyDay = 1, Custom = 2 }
|
||||||
|
```
|
||||||
|
|
||||||
|
`PrimeScheduleEntity` gains `public PrimeActionKind Kind { get; set; } = PrimeActionKind.Ping;`,
|
||||||
|
mapped in `PrimeScheduleEntityConfiguration` to column `action_kind`, required, default value
|
||||||
|
`PrimeActionKind.Ping` — the same shape as the existing `days_of_week` mapping.
|
||||||
|
|
||||||
|
Migration `AddPrimeActionKind`, based on `20260821155619_AddUsageLimitAutoContinue` (current
|
||||||
|
head — check for a newer head before scaffolding; sibling migrations off the same parent
|
||||||
|
silently drop each other's columns on a SQLite table rebuild).
|
||||||
|
|
||||||
|
**Existing rows migrate to `Ping`** (column default 0, no data backfill). This is a deliberate
|
||||||
|
behaviour change requested by the user: today's schedules stop filling MyDay until he switches
|
||||||
|
them back in Settings. Do not "helpfully" backfill them to `FillMyDay`.
|
||||||
|
|
||||||
|
`prompt_override` is reused rather than split, with a role that depends on `Kind`:
|
||||||
|
|
||||||
|
| Kind | `prompt_override` means |
|
||||||
|
|---|---|
|
||||||
|
| `Ping` | ignored |
|
||||||
|
| `FillMyDay` | an *addition*, appended to the daily-prep prompt (unchanged from today) |
|
||||||
|
| `Custom` | the *entire* prompt, used verbatim |
|
||||||
|
|
||||||
|
`PrimeScheduleRepository.UpsertAsync` must copy `Kind` onto the existing row alongside
|
||||||
|
`Days`/`TimeOfDay`/`Enabled`/`PromptOverride`. Forgetting it is silent — the update just keeps
|
||||||
|
the old kind.
|
||||||
|
|
||||||
|
## Worker
|
||||||
|
|
||||||
|
`PrimeScheduleDto` gains `PrimeActionKind Kind`. `PrimeScheduler.ToDto` maps it.
|
||||||
|
|
||||||
|
`PrimeRunner.FireAsync` keeps its single-flight `SemaphoreSlim` gate (it guards *all* kinds —
|
||||||
|
two schedules must never overlap regardless of kind) and its `FireTimeout`, then branches:
|
||||||
|
|
||||||
|
| Kind | Prompt | CLI args | Log file | `PrepStarted`/`PrepLine`/`PrepFinished` |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `Ping` | fixed one-liner, not user-editable | `-p --output-format stream-json --verbose --permission-mode default --max-turns 1 --strict-mcp-config` | none | not raised |
|
||||||
|
| `FillMyDay` | `DailyPrepPrompt.BuildPrompt(maxTasks, today, promptOverride)` | unchanged (`DailyPrepPrompt.BuildArgs`) | `daily-prep.log`, truncated per run | raised |
|
||||||
|
| `Custom` | `promptOverride` verbatim | `-p --output-format stream-json --verbose --permission-mode acceptEdits --max-turns 30 --allowedTools mcp__claudedo` | none | not raised |
|
||||||
|
|
||||||
|
`--strict-mcp-config` without a `--mcp-config` argument loads no MCP server at all, so a Ping
|
||||||
|
cannot reach ClaudeDo's tools even if the model tries. Combined with `--max-turns 1` a Ping is
|
||||||
|
one turn and done.
|
||||||
|
|
||||||
|
`Custom` deliberately gets **only** the ClaudeDo MCP server — no Read/Write/Edit/Bash. An
|
||||||
|
unattended 07:00 run should be able to create and queue tasks, not touch the filesystem.
|
||||||
|
|
||||||
|
All three kinds still:
|
||||||
|
- run in `Paths.AppDataRoot()` as cwd,
|
||||||
|
- update `last_run_at` (in `PrimeScheduler.FireAsync`, unchanged),
|
||||||
|
- broadcast `PrimeFired(scheduleId, success, message, firedAt)`, which drives the footer flash.
|
||||||
|
|
||||||
|
`WorkerHub.RunDailyPrepNow` builds its synthetic `PrimeScheduleDto` with
|
||||||
|
`Kind: PrimeActionKind.FillMyDay`. The "Plan day" button in the MyDay panel means "fill my day"
|
||||||
|
and must keep meaning that no matter how the schedules are configured.
|
||||||
|
|
||||||
|
`WorkerHub.UpsertPrimeSchedule` rejects `Kind == Custom` with a blank `PromptOverride`, so a
|
||||||
|
schedule can never fire `claude -p ""` at 07:00.
|
||||||
|
|
||||||
|
## UI
|
||||||
|
|
||||||
|
`PrimeScheduleRowViewModel` gains `[ObservableProperty] PrimeActionKind _kind` plus three
|
||||||
|
derived booleans for radio binding — `IsPing`, `IsFillMyDay`, `IsCustom`. Setting a boolean to
|
||||||
|
`true` sets `Kind`; `OnKindChanged` raises change notifications for all three. Three booleans
|
||||||
|
rather than an enum-to-bool converter keeps compiled bindings straightforward.
|
||||||
|
|
||||||
|
`PrimeClaudeTabViewModel.AddSchedule` creates rows with `Kind: PrimeActionKind.Ping`.
|
||||||
|
|
||||||
|
`PrimeClaudeTabViewModel.Validate` adds: a `Custom` row with a blank prompt returns an error
|
||||||
|
naming the row's time.
|
||||||
|
|
||||||
|
`SettingsModalView.axaml`, Prime tab, inside the schedule `DataTemplate`:
|
||||||
|
|
||||||
|
- A horizontal row of three `RadioButton`s bound to `IsPing`/`IsFillMyDay`/`IsCustom`.
|
||||||
|
**`GroupName` must be per-row unique** (bind it to the row `Id`) — a shared group name makes
|
||||||
|
every schedule in the `ItemsControl` share one selection.
|
||||||
|
- The prompt `TextBox` is hidden when `IsPing`, and its label switches between the existing
|
||||||
|
"Prompt addition" (FillMyDay) and a new "Prompt" (Custom).
|
||||||
|
- The `DailyPrepMaxTasks` `NumericUpDown` below the list is disabled when no row is
|
||||||
|
`FillMyDay`, via a computed `AnyFillMyDay` on the tab VM that recomputes on row add/remove
|
||||||
|
and on `Kind` changes. A live number that controls nothing is worse than a greyed-out one.
|
||||||
|
|
||||||
|
New locale keys in both `en.json` and `de.json` (parity is test-enforced):
|
||||||
|
`settings.prime.actionLabel`, `actionPing`, `actionFillMyDay`, `actionCustom`, `actionHint`,
|
||||||
|
`customPromptLabel`, `customPromptPlaceholder`, `maxTasksDisabledHint`. The tab's existing
|
||||||
|
`description` is reworded — it currently claims every schedule fires a ping.
|
||||||
|
|
||||||
|
The validation message stays a hardcoded English string in `PrimeClaudeTabViewModel.Validate`,
|
||||||
|
matching the messages already there ("select at least one day.").
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
**Worker.Tests**
|
||||||
|
- `PrimeRunnerTests`: one test per kind against the fake CLI runner asserting the args and the
|
||||||
|
prompt handed to it; a `Ping` run writes no log file and raises no `Prep*` events; a
|
||||||
|
`FillMyDay` run still does both.
|
||||||
|
- `PrimeScheduleRepositoryTests`: `Kind` round-trips, and `UpsertAsync` on an existing row
|
||||||
|
updates it.
|
||||||
|
- Migration default: a schedule row created before the column exists reads back as `Ping`.
|
||||||
|
|
||||||
|
**Ui.Tests**
|
||||||
|
- `PrimeClaudeTabViewModelTests`: a new row defaults to `Ping`; setting `IsCustom` flips `Kind`
|
||||||
|
and clears the other two; `Validate` rejects `Custom` with a blank prompt; `AnyFillMyDay`
|
||||||
|
tracks row changes.
|
||||||
|
|
||||||
|
`Localization.Tests` covers the new keys' en/de parity automatically.
|
||||||
|
|
||||||
|
## Out of scope
|
||||||
|
|
||||||
|
- No new log file or log viewer for Ping/Custom. The existing `daily-prep.log` and its
|
||||||
|
`ShowPrepLogCommand` viewer stay exactly as they are, now fed only by `FillMyDay`.
|
||||||
|
- No per-kind model/effort override — all kinds use whatever the Prime path uses today.
|
||||||
|
|
||||||
|
## Visual verification gap
|
||||||
|
|
||||||
|
The radio-group layout inside the schedule card, the hidden/relabelled prompt box, and the
|
||||||
|
disabled `DailyPrepMaxTasks` field cannot be verified headlessly. The user does the visual pass.
|
||||||
@@ -0,0 +1,198 @@
|
|||||||
|
# TokenTracker als Auswertungs-Backend für die Token-Analytics
|
||||||
|
|
||||||
|
**Datum:** 2026-08-24
|
||||||
|
**Status:** freigegeben, Implementierung offen
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
ClaudeDo pflegt zwei eigene Token-Datenpfade:
|
||||||
|
|
||||||
|
1. `ClaudeOAuthUsageClient` (170 Zeilen) — pollt `https://api.anthropic.com/api/oauth/usage`
|
||||||
|
für die 5h-/7d-Limits. Speist Pill, Gauges, `UsageGate` und `UsageThrottle`.
|
||||||
|
2. `TranscriptUsageReader` (161 Zeilen) — parst `~/.claude/projects/**/*.jsonl` und aggregiert
|
||||||
|
nach Datum/Modell/Scope für die Analytics-Ansicht im Usage-Monitor.
|
||||||
|
|
||||||
|
Pfad 2 ist der teure und undankbare Teil: ein Voll-Scan über die Transkript-Historie (gemessen
|
||||||
|
2026-08-06: 501 Dateien / 230 MB, ein 7-Tage-Range berührt ~190 Dateien / ~106 MB), eigener
|
||||||
|
mtime/Length-Cache, `requestId`-Dedupe, `<synthetic>`-Filter — und trotzdem ohne Kosten in USD,
|
||||||
|
weil wir keine Preistabelle pflegen.
|
||||||
|
|
||||||
|
[TokenTracker](https://github.com/xiufengsun/TokenTracker) (MIT, Node 20+) macht genau diese
|
||||||
|
Auswertung als Kernprodukt, inklusive gepflegter Preistabelle. Ziel: die **Auswertung** abgeben,
|
||||||
|
die **Darstellung** in ClaudeDo behalten.
|
||||||
|
|
||||||
|
## Nicht-Ziel: Limits, Gate, Throttle
|
||||||
|
|
||||||
|
Die 5h-/7d-Limits bleiben bei unserem eigenen OAuth-Poll. Begründung (gegen den installierten
|
||||||
|
TokenTracker verifiziert, 2026-08-24):
|
||||||
|
|
||||||
|
- `~/.tokentracker/tracker/claude-usage-limits-cache.json` hat **exakt die Shape unserer
|
||||||
|
OAuth-Antwort** (`five_hour` / `seven_day` / `seven_day_opus` / `weekly_scoped` /
|
||||||
|
`extra_usage`) — dieselbe Quelle, kein inhaltlicher Gewinn.
|
||||||
|
- Der Cache war zum Prüfzeitpunkt **13 Tage alt** (`cached_at: 2026-08-11`), während die
|
||||||
|
Token-Queue desselben Tools von heute war. Ein Gate, das über das Starten von Tasks
|
||||||
|
entscheidet, darf nicht an einem Cache hängen, der still veraltet.
|
||||||
|
|
||||||
|
`UsageState`, `UsageMonitorService`, `UsageSnapshotBuilder`, `UsageGate`, `UsageThrottle`,
|
||||||
|
`UsagePillViewModel` und die Gauges bleiben unangetastet.
|
||||||
|
|
||||||
|
## Datenquelle
|
||||||
|
|
||||||
|
`tokentracker sessions --from YYYY-MM-DD --to YYYY-MM-DD --no-git --format json`
|
||||||
|
|
||||||
|
Dokumentiert in `tokentracker --help`. Liefert pro Session:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"session_hash": "51d4de2afadecd97f9a600ad",
|
||||||
|
"source": "claude",
|
||||||
|
"project_key": "ClaudeDo",
|
||||||
|
"model": "claude-opus-5",
|
||||||
|
"started_at": "2026-08-24T07:38:03.653Z",
|
||||||
|
"ended_at": "2026-08-24T07:48:04.728Z",
|
||||||
|
"turns": 1, "edit_turns": 0, "retry_turns": 0,
|
||||||
|
"tokens": { "input_tokens": 32, "cached_input_tokens": 1063433,
|
||||||
|
"cache_creation_input_tokens": 67524, "output_tokens": 14048,
|
||||||
|
"reasoning_output_tokens": 0, "total_tokens": 1145037 },
|
||||||
|
"total_tokens": 1145037,
|
||||||
|
"cost_usd": 1.3051015,
|
||||||
|
"productive": false, "first_pass": false, "one_shot": false,
|
||||||
|
"provenance": { "source": "local-session-log", "content_retained": false },
|
||||||
|
"version": 11
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Dazu fertige Aggregate `totals` und `by_model` (die wir nicht verwenden, siehe *Caching*).
|
||||||
|
|
||||||
|
### Verifizierte Eigenschaften
|
||||||
|
|
||||||
|
| Behauptung | Befund |
|
||||||
|
|---|---|
|
||||||
|
| Rein lokal | `buildSessionAnalytics` liest `~/.claude/projects/**` direkt (`lib/session-analytics.js:976-979`). Kein Account, kein Netzwerk, keine Hooks nötig. |
|
||||||
|
| Kein `init` erforderlich | Der Export funktioniert mit dem bloßen npm-Paket. |
|
||||||
|
| Join auf unsere Runs möglich | `session_hash = sha256("claude\0" + sessionId).hex[0..24]` (`lib/session-analytics.js:88`), deterministisch in .NET nachrechenbar. |
|
||||||
|
| Worktree-Sessions enthalten | Drei ClaudeDo-Worktree-Sessions aus `~/.claude/projects/…claudedo-worktrees-…` per Hash im Export gefunden (2026-08-24). Der Kommentar auf `:149` über „throwaway per-agent checkouts" betrifft nur die Projekt-Attribution, nicht das Verwerfen von Sessions. |
|
||||||
|
| `project_key` ist für uns unbrauchbar | Bei Worktrees fällt er teils auf die nackte Worktree-GUID zurück (`11da6ebb-…` u. a. im Export). Deshalb joinen wir über `session_hash`, nie über `project_key`. |
|
||||||
|
| Laufzeit | **11,5 s** für einen 1-Tages-Range (gecacht). `buildSessionAnalytics` läuft immer über die gesamte Historie; `--from`/`--to` filtern erst in `summarizeSessions`. Also kein Performance-Gewinn gegenüber unserem Reader (1,7 s kalt) — der Gewinn liegt bei Kosten, Effizienzmetriken und entfallender Pflege. |
|
||||||
|
|
||||||
|
### Warum kein `tokentracker init`
|
||||||
|
|
||||||
|
`init` schreibt `Stop`- und `SessionEnd`-Hooks in die **globale** `~/.claude/settings.json` und
|
||||||
|
aktiviert Cloud-Sync (`cloud-sync-pref.enabled: true`) zu `srctyff5.us-east.insforge.app`. Der
|
||||||
|
Upload enthält u. a. `project_ref` — auf dieser Maschine `https://git.kuns.dev/releases/ClaudeDo`,
|
||||||
|
also einen internen Hostnamen. Das ist eine zu weitgehende Nebenwirkung, um sie hinter einen
|
||||||
|
Button in ClaudeDo zu legen. ClaudeDo ruft ausschließlich `sessions` auf und nie `init`.
|
||||||
|
Wer Dashboard und Cloud-Sync will, richtet das selbst ein.
|
||||||
|
|
||||||
|
## Architektur
|
||||||
|
|
||||||
|
Neuer Ordner `src/ClaudeDo.Worker/Usage/TokenTracker/`:
|
||||||
|
|
||||||
|
| Typ | Rolle |
|
||||||
|
|---|---|
|
||||||
|
| `ITokenTrackerClient` (in `Interfaces/`) | `Task<TokenTrackerExport?> ExportAsync(DateOnly from, DateOnly to, CancellationToken)` + `Task<TokenTrackerProbe> ProbeAsync(CancellationToken)` |
|
||||||
|
| `TokenTrackerClient` | Startet den Prozess, liest stdout, parst JSON. Timeout 120 s, danach Prozessbaum killen. Auflösung der Binary über `ExecutableResolver` (`ClaudeDo.Data`) wie beim `claude`-CLI, inklusive `.cmd`-Shim-Start über `cmd.exe /c`. **Nie `npx`** — das würde still nachladen. |
|
||||||
|
| `TokenTrackerProbe` | `(bool Installed, string? Version, bool NodeOk, string? NodeVersion, string? Error)`. `tokentracker -v` und `node --version`; Ergebnis gecacht bis zu einem expliziten Re-Probe. |
|
||||||
|
| `TokenTrackerState` | Threadsafe Singleton nach Vorbild von `UsageState`: letztes gutes `TokenTrackerExport`, `FetchedAtUtc`, `LastError`. **Ein Fehler überschreibt nie ein gutes Snapshot.** |
|
||||||
|
| `TokenTrackerModels` | `TokenTrackerExport`, `TokenTrackerSession`, `TokenTrackerProbe`. |
|
||||||
|
| `TokenTrackerAggregator` | Pure statisch: filtert `sessions[]` auf einen Range und aggregiert nach Modell bzw. nach Task. Keine I/O, voll testbar. |
|
||||||
|
| `TokenTrackerInstaller` | Führt `npm i -g tokentracker-cli` aus und streamt stdout/stderr zeilenweise an den Aufrufer; danach Re-Probe. |
|
||||||
|
|
||||||
|
### Caching und Refresh
|
||||||
|
|
||||||
|
- Ein Fetch holt ein **90-Tage-Fenster** und wird gecacht. Alle Ansichten (7d/30d/custom) werden
|
||||||
|
lokal aus `sessions[]` gefiltert und aggregiert — daher verwenden wir `totals`/`by_model` aus dem
|
||||||
|
Export nicht, sondern rechnen selbst aus den Session-Zeilen. Range-Wechsel im Modal sind damit
|
||||||
|
instant, die 11,5 s fallen nur beim Refresh an.
|
||||||
|
- Refresh-Auslöser: Modal-Open, wenn das Snapshot älter als 15 min ist (im Hintergrund, nie
|
||||||
|
UI-blockierend), plus ein manueller Refresh-Button. Die UI zeigt „Stand: hh:mm".
|
||||||
|
- Ist gar kein Snapshot da, zeigt der Analytics-Block einen Ladezustand, nie leere Nullwerte.
|
||||||
|
|
||||||
|
### Versionsschutz
|
||||||
|
|
||||||
|
`sessions` ist kein zugesagter API-Vertrag. Wir prüfen das `version`-Feld der Session-Zeilen
|
||||||
|
(aktuell `11`). Bei unbekannter Version zeigt der Analytics-Block einen Klartext-Hinweis
|
||||||
|
(„Auswertung nicht verfügbar: unerwartetes TokenTracker-Format vX") statt Zahlen zu erfinden.
|
||||||
|
Fehlende Felder werden defensiv als `null`/`0` behandelt, ein Parse-Fehler landet in
|
||||||
|
`LastError` und lässt das letzte gute Snapshot stehen.
|
||||||
|
|
||||||
|
## Hub-Oberfläche
|
||||||
|
|
||||||
|
- **`GetModelUsage(from, to)`** behält Namen und Aufrufer, speist sich aber aus
|
||||||
|
`TokenTrackerState`. `ModelUsageRowDto` bekommt ein zusätzliches `double? CostUsd`.
|
||||||
|
Der Scope-Split `claudedo` / `other` kommt jetzt aus der **`session_hash`-Mitgliedschaft in
|
||||||
|
`task_runs`** statt aus der Pfad-Heuristik des alten Readers — das ist genauer, weil
|
||||||
|
Worktree-Pfade und die GUID-Fallbacks von `project_key` keine Rolle mehr spielen.
|
||||||
|
- **`GetTaskUsage(from, to)`** bleibt `task_runs`-basiert (sofort verfügbar, funktioniert ohne
|
||||||
|
TokenTracker). `TaskUsageRowDto` wird um `double? CostUsd`, `int? Retries`, `bool? Productive`,
|
||||||
|
`bool? OneShot` erweitert. Gefüllt werden diese Felder über die `SessionId` der Runs des Tasks →
|
||||||
|
Hash → passende TokenTracker-Session; ohne Snapshot bleiben sie `null`.
|
||||||
|
- **Neu `GetTokenTrackerStatus()`** → `TokenTrackerStatusDto(bool Installed, string? Version,
|
||||||
|
bool NodeOk, string? NodeVersion, DateTime? LastFetchedUtc, string? LastError,
|
||||||
|
int? FormatVersion)`.
|
||||||
|
- **Neu `RefreshTokenTrackerAsync()`** → erzwingt einen Fetch (für den Refresh-Button).
|
||||||
|
- **Neu `InstallTokenTrackerAsync()`** → startet `npm i -g tokentracker-cli`; Fortschritt läuft
|
||||||
|
über den bestehenden `OperationProgress`-Kanal, Ausgabezeilen über `WorkerLog`.
|
||||||
|
|
||||||
|
`IWorkerClient` und `WorkerClient` in `ClaudeDo.Ui` spiegeln alles.
|
||||||
|
|
||||||
|
## UI
|
||||||
|
|
||||||
|
Nur der Analytics-Teil des Usage-Monitors ändert sich; Gauges, Legenden, Drag-Marker und die
|
||||||
|
Pill bleiben wie sie sind.
|
||||||
|
|
||||||
|
**Mit TokenTracker:**
|
||||||
|
|
||||||
|
- Kopfzeile des Analytics-Blocks: Total Tokens **und Total Cost (USD)** für den Range,
|
||||||
|
plus „Stand: hh:mm" und Refresh-Button.
|
||||||
|
- Breakdown pro Modell: Tokens (In/Out/Cache) + USD, weiterhin mit ClaudeDo-/Other-Split.
|
||||||
|
- Breakdown pro Task: bestehende Spalten + USD + Retries + Effizienz-Marker
|
||||||
|
(`productive` / `one_shot`).
|
||||||
|
|
||||||
|
**Ohne TokenTracker** steht an derselben Stelle eine Hinweis-Karte:
|
||||||
|
|
||||||
|
> Die Token-Auswertung übernimmt TokenTracker (MIT, läuft rein lokal, liest keine Prompts).
|
||||||
|
> ClaudeDo ruft nur den lokalen Export auf und aktiviert **kein** `init`, keine Hooks und keinen
|
||||||
|
> Cloud-Sync.
|
||||||
|
|
||||||
|
mit Button **TokenTracker installieren** → `npm i -g tokentracker-cli`. Die Ausgabezeilen laufen
|
||||||
|
über `WorkerLog` in die Footer-Leiste, die Karte selbst zeigt die jeweils letzte Zeile als
|
||||||
|
Statuszeile; danach automatischer Re-Probe. Fehlt Node 20+, zeigt die Karte statt des Buttons den
|
||||||
|
Node-Hinweis samt Versionsangabe. Die Task-Tabelle bleibt in diesem Zustand funktionsfähig, nur
|
||||||
|
ohne die USD-/Effizienz-Spalten. Fehler beim Installieren gehen über `FlashFooterError`, nicht in
|
||||||
|
ein `catch {}`.
|
||||||
|
|
||||||
|
## Was entfällt
|
||||||
|
|
||||||
|
- `TranscriptUsageReader.ReadAsync` samt Datums-/Modell-/Scope-Aggregation, mtime/Length-Cache,
|
||||||
|
`requestId`-Dedupe und dem 106-MB-Scan (~120 der 161 Zeilen).
|
||||||
|
- `ITranscriptUsageReader` schrumpft auf `ReadSessionTotalsAsync`.
|
||||||
|
- `UsageAggregateRow` / `UsageScope`, falls nach dem Umbau ohne Konsumenten.
|
||||||
|
|
||||||
|
`ReadSessionTotalsAsync` **bleibt**: das Per-Run-Accounting in `TaskRunner.ApplyUsageAsync`
|
||||||
|
schreibt `task_runs.tokens_*` direkt am Ende eines Runs und darf nicht auf einen 11 s
|
||||||
|
dauernden Batch-Export warten.
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
- Ein anonymisiertes, eingechecktes Export-Fixture (JSON) für Parser und `TokenTrackerAggregator`:
|
||||||
|
Range-Filter, Modell-Aggregation, Task-Aggregation, Kostensummen.
|
||||||
|
- `session_hash`-Test: bekannte Session-ID → erwarteter Hash (Gegenprobe zu
|
||||||
|
`sha256("claude\0" + id)[0..24]`).
|
||||||
|
- Join-Test: `task_runs`-Zeilen mit Session-IDs + Fixture → erwartete USD/Effizienz pro Task.
|
||||||
|
- Fail-open-Tests: Binary fehlt, Exit-Code ≠ 0, Timeout, kaputtes JSON, unbekannte
|
||||||
|
`version` — jeweils letztes gutes Snapshot bleibt stehen, `LastError` gesetzt.
|
||||||
|
- **Kein Test ruft das echte CLI auf** (analog zur Regel für den `claude`-CLI). `ITokenTrackerClient`
|
||||||
|
wird gefakt.
|
||||||
|
- Fakes in `Worker.Tests` und `Ui.Tests` nachziehen: `IWorkerClient`, `WorkerHub` und die
|
||||||
|
erweiterten DTOs brechen die handgeschriebenen Fakes in beiden Projekten.
|
||||||
|
|
||||||
|
## Offene Verifikationspunkte
|
||||||
|
|
||||||
|
- Visueller Pass für den umgebauten Analytics-Block und die Hinweis-Karte (beide Zustände:
|
||||||
|
installiert / nicht installiert) — muss der Nutzer prüfen.
|
||||||
|
- Einmal echt gegen ein System ohne TokenTracker: Probe, Hinweis-Karte, Install-Button,
|
||||||
|
Re-Probe, erste Auswertung.
|
||||||
|
- Nach dem Umbau `docs/explore-notes/usage-monitoring.md` fortschreiben (Abschnitte
|
||||||
|
*Per-run token accounting*, *UI surfaces*, *Hub surface*) und den „verified against"-Commit
|
||||||
|
anheben.
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
# Ticketsystem-Anbindung (Bandel TicketSystem)
|
||||||
|
|
||||||
|
Datum: 2026-08-27
|
||||||
|
Status: Design freigegeben, Umsetzung offen
|
||||||
|
|
||||||
|
## Ziel
|
||||||
|
|
||||||
|
Tickets aus dem hauseigenen Ticketsystem (`Bandel.APIs`) pro Projekt in eine ClaudeDo-Liste
|
||||||
|
importieren und den Ticket-Status automatisch nachziehen, während der Task durch die Queue läuft.
|
||||||
|
|
||||||
|
Das Feature ist **vollständig optional**: ohne konfigurierte Base-URL passiert nichts — kein
|
||||||
|
Netzwerkverkehr, kein Hook, kein sichtbarer Menüeintrag.
|
||||||
|
|
||||||
|
## Nicht-Ziele (bewusst weggelassen)
|
||||||
|
|
||||||
|
| Weggelassen | Wann nachrüsten |
|
||||||
|
|---|---|
|
||||||
|
| Polling / Hintergrund-Sync | Wenn der manuelle Import spürbar nervt |
|
||||||
|
| Zwei-Wege-Sync (Ticket-Änderung → Task) | Wenn Titel/Beschreibung real auseinanderlaufen |
|
||||||
|
| Jira-Provider + `ITicketProvider`-Interface | Wenn Jira tatsächlich kommt — Interface-Extract ist ein Rider-Refactor von 30 s |
|
||||||
|
| Update bereits importierter Tickets | Würde Task-Notizen überschreiben; erst mit klarer Merge-Regel |
|
||||||
|
| Kommentar ans Ticket beim Merge | Wenn die Rückverfolgbarkeit fehlt |
|
||||||
|
|
||||||
|
Der einzige Vorgriff auf Jira ist das Provider-Präfix in `TaskEntity.TicketRef` (`bandel:1234`).
|
||||||
|
Das kostet nichts und erspart später eine Migration.
|
||||||
|
|
||||||
|
## Externe API
|
||||||
|
|
||||||
|
Base-URL: `http://bandelapis.fb-tuning.local`
|
||||||
|
Auth: derselbe Personal Access Token (`tsp_…`), den auch der Ticket-MCP nutzt.
|
||||||
|
Die relevanten Endpunkte akzeptieren `[Authorize(AuthenticationSchemes = "Bearer,Pat")]`.
|
||||||
|
|
||||||
|
| Zweck | Endpoint | Scope |
|
||||||
|
|---|---|---|
|
||||||
|
| Token-Inhaber ermitteln | `GET /api/ticketsystem/pat/me` | — (keine Scope-Policy) |
|
||||||
|
| Projekte je Abteilung | `GET /api/Navigation/sidebar` | `pat:projects:read` |
|
||||||
|
| Board eines Projekts | `GET /api/Board/project/{projectId}` | `pat:board:read` |
|
||||||
|
| Status setzen | `PATCH /api/Ticket/{id}/status` | `pat:tickets:write` |
|
||||||
|
|
||||||
|
Antworten sind in `BandelApiResponse<T>` gewrappt (`{ Success, Data, Message, ErrorCode }`).
|
||||||
|
Das Board liefert `GetTicketSummaryDto` mit u. a. `Id`, `Title`, `Description`, `StatusId`,
|
||||||
|
`StatusName`, `AssigneeID`, `AssigneeName`.
|
||||||
|
|
||||||
|
Ticket-Status: `0 Keine`, `1 Offen`, `2 InBearbeitung`, `3 Fertig`, `4 Archiviert`.
|
||||||
|
|
||||||
|
> **Nicht verifiziert:** Die API läuft auf srv-04b, gegen den hier nicht geprobt wurde. Die
|
||||||
|
> Endpunkte und DTO-Felder stammen aus dem Quellcode von `Bandel.APIs`, nicht aus einem
|
||||||
|
> Live-Aufruf. Der erste manuelle Smoke-Test muss die tatsächlichen Response-Shapes bestätigen
|
||||||
|
> (siehe „Manuelle Verifikation").
|
||||||
|
|
||||||
|
## Konfiguration
|
||||||
|
|
||||||
|
### Global
|
||||||
|
|
||||||
|
- Base-URL: `ticket_api_base_url` in `~/.claudeDo/worker.config.json`. Null/leer = Feature aus.
|
||||||
|
> Der Plan weicht hier bewusst vom ursprünglichen Entwurf ab (der eine Spalte in
|
||||||
|
> `AppSettingsEntity` vorsah): `WorkerConfig.SaveKey` kann das read-modify-write bereits
|
||||||
|
> generisch, `claude_bin` ist der Präzedenzfall für ein UI-schreibbares Feld in dieser Datei,
|
||||||
|
> und weil `WorkerConfig` ein DI-Singleton ist, kommt der Hook in `TaskStateService` ohne
|
||||||
|
> DB-Abfrage aus. Spart zugleich eine Migrationsspalte.
|
||||||
|
- PAT: DPAPI-verschlüsselt in `~/.claudeDo/ticket.pat`, **CurrentUser-Scope**.
|
||||||
|
`OnlineTokenStore` macht das bereits exakt so — ihm fehlt nur ein Dateiname-Parameter im
|
||||||
|
parameterlosen Ctor. Der wird zum optionalen Argument, die Klasse wandert nach
|
||||||
|
`ClaudeDo.Worker/` (raus aus `Online/`) und wird von beiden Features genutzt.
|
||||||
|
**Kein neuer Krypto-Code.**
|
||||||
|
|
||||||
|
Der Token landet nie in `worker.config.json` und nie in der DB.
|
||||||
|
|
||||||
|
### Pro Liste
|
||||||
|
|
||||||
|
- `ListConfigEntity.TicketProjectId` (`int?`, Spalte `ticket_project_id`).
|
||||||
|
Null = Liste ist nicht mit einem Ticket-Projekt verknüpft.
|
||||||
|
|
||||||
|
> ⚠️ **Verbatim-Copy-Falle:** `ListRepository.SetConfigAsync` überschreibt jede Spalte mit dem
|
||||||
|
> übergebenen Entity. Jeder Writer (`set_list_config` MCP-Tool, Listen-Settings-Modal) muss
|
||||||
|
> `TicketProjectId` mitführen, sonst setzt der nächste fremde Schreibvorgang die Verknüpfung
|
||||||
|
> still zurück — derselbe Fehler, der `SessionSkills` schon einmal getroffen hat.
|
||||||
|
|
||||||
|
## Datenmodell
|
||||||
|
|
||||||
|
- `TaskEntity.TicketRef` (`string?`, Spalte `ticket_ref`) — Format `<provider>:<id>`, aktuell
|
||||||
|
immer `bandel:<ticketId>`. Kein Index nötig; der Import filtert über die Liste, nicht global.
|
||||||
|
- `ListConfigEntity.TicketProjectId` (`int?`)
|
||||||
|
- `AppSettingsEntity.TicketApiBaseUrl` (`string?`)
|
||||||
|
|
||||||
|
Eine EF-Migration mit drei Spalten über drei Tabellen.
|
||||||
|
|
||||||
|
> ⚠️ **Migrations-Kollision:** Parallel entstandene Migrationen vom selben Elternknoten löschen
|
||||||
|
> sich bei einem SQLite-Table-Rebuild gegenseitig die Spalten weg, und die Tests laufen mit
|
||||||
|
> `EnsureCreated` und merken es nicht. Diese Migration entsteht als einzelne, nachdem alle
|
||||||
|
> parallelen Tasks gemergt sind — nicht in einem Nebenläufer.
|
||||||
|
|
||||||
|
## Import: „Update from Ticketsystem"
|
||||||
|
|
||||||
|
Einstieg: Kontextmenü der Liste in `ListsIslandView.axaml`, direkt über „Einstellungen".
|
||||||
|
Sichtbar nur, wenn Base-URL gesetzt **und** die Liste ein `TicketProjectId` hat.
|
||||||
|
|
||||||
|
Ablauf (Worker, über eine neue Hub-Methode `ImportTicketsAsync(listId)`):
|
||||||
|
|
||||||
|
1. `GET /api/ticketsystem/pat/me` → `UserName` des Token-Inhabers.
|
||||||
|
2. `GET /api/Board/project/{TicketProjectId}` → Board-Items.
|
||||||
|
3. Filtern auf `StatusId == 1` (Offen) **und** `AssigneeName == UserName`
|
||||||
|
(Ordinal, case-insensitive). Alles andere wird ignoriert.
|
||||||
|
4. Bereits vorhandene `TicketRef`-Werte der Liste laden; Treffer überspringen.
|
||||||
|
5. Pro verbleibendem Ticket ein Task via `TaskRepository.AddAsync`:
|
||||||
|
- `Status = Idle`, `ListId` = die Liste
|
||||||
|
- `Title` = Ticket-Titel
|
||||||
|
- `Description` = Ticket-Beschreibung + Leerzeile + `Ticket #<id>`
|
||||||
|
- `TicketRef = "bandel:<id>"`
|
||||||
|
- `CreatedBy = "ticketsystem"`
|
||||||
|
6. Ergebnis als Footer-Meldung: „12 Tickets geprüft, 3 neue Tasks."
|
||||||
|
|
||||||
|
Der Import erzeugt nur `Idle`-Tasks — er queued nichts. Ob und wann etwas läuft, bleibt eine
|
||||||
|
bewusste Nutzeraktion.
|
||||||
|
|
||||||
|
**Warum Board-Filter statt `GET /api/Board/global/{userId}`:** Das globale Board wählt Items über
|
||||||
|
Zuweisung *oder* Reporter *oder* PersonInCharge aus. Das ist breiter als „mir zugewiesen".
|
||||||
|
Der Namensvergleich ist bewusst gewählt (`/pat/me` liefert keine UserId, und Benutzernamen
|
||||||
|
ändern sich hier nicht).
|
||||||
|
|
||||||
|
## Write-back: Hook in `TaskStateService`
|
||||||
|
|
||||||
|
`TaskStateService` ist der einzige Ort im System, der `Status` schreibt. Ein Hook dort deckt
|
||||||
|
Queue-Picker, Merge/Approve, Cancel, Reset und beide MCP-Oberflächen gleichzeitig ab — jede
|
||||||
|
andere Stelle wäre ein Teilabdeckungs-Fix.
|
||||||
|
|
||||||
|
| Task-Status | Ticket-Status |
|
||||||
|
|---|---|
|
||||||
|
| `Running`, `WaitingForReview` | `2 InBearbeitung` |
|
||||||
|
| `Done` | `3 Fertig` |
|
||||||
|
| alles andere (`Idle`, `Queued`, `WaitingForChildren`, `Failed`, `Cancelled`) | **kein Schreiben** |
|
||||||
|
|
||||||
|
`1 Offen` wird nie geschrieben: das ist der Eingangszustand. Ein fehlgeschlagener oder
|
||||||
|
abgebrochener Task lässt das Ticket bewusst auf `InBearbeitung` stehen — die Arbeit ist
|
||||||
|
angefangen, nicht zurückgegeben.
|
||||||
|
|
||||||
|
Auslösebedingungen (alle müssen gelten, sonst passiert nichts):
|
||||||
|
|
||||||
|
- `task.TicketRef` ist gesetzt und beginnt mit `bandel:`
|
||||||
|
- `TicketApiBaseUrl` ist konfiguriert und ein PAT liegt vor
|
||||||
|
- der Zielstatus unterscheidet sich vom letzten geschriebenen (kein redundanter PATCH bei
|
||||||
|
`Running → WaitingForReview`, beide mappen auf `2`)
|
||||||
|
|
||||||
|
Der Aufruf ist fire-and-forget mit `try/catch`: ein Fehler wird als Warnung geloggt (landet über
|
||||||
|
`BroadcastLogSink` im Footer-Log-Strip) und beendet den Statuswechsel **nie**. Das Ticketsystem
|
||||||
|
darf die Queue nicht anhalten können.
|
||||||
|
|
||||||
|
## UI
|
||||||
|
|
||||||
|
### Settings-Modal — neuer Tab „Ticketsystem"
|
||||||
|
|
||||||
|
Unter „Erweitert", wie der Online-Inbox-Tab (`SettingsModalView.axaml`, `ErweitertCategories`):
|
||||||
|
|
||||||
|
- Base-URL (Textfeld)
|
||||||
|
- Personal Access Token (maskiert; gespeichert = Anzeige „gesetzt", nicht der Wert)
|
||||||
|
- Button „Verbindung testen" → `GET /api/ticketsystem/pat/me`, zeigt Benutzername und die
|
||||||
|
gewährten Scopes an. Fehlt `pat:board:read` oder `pat:tickets:write`, wird das als Hinweis
|
||||||
|
ausgegeben — das ist der häufigste Konfigurationsfehler.
|
||||||
|
|
||||||
|
Neues `TicketSettingsTabViewModel` neben `OnlineInboxSettingsViewModel`, gleiches Muster
|
||||||
|
(`LoadAsync`, `IsBusy`, `StatusMessage`).
|
||||||
|
|
||||||
|
### Listen-Settings-Modal — Projektzuordnung
|
||||||
|
|
||||||
|
Ein Dropdown „Ticket-Projekt" mit den Projekten aus `GET /api/Navigation/sidebar`, gruppiert
|
||||||
|
nach Abteilung, plus „— keins —". Lädt beim Öffnen des Modals, nur wenn eine Base-URL
|
||||||
|
konfiguriert ist; sonst ist das Feld ausgeblendet.
|
||||||
|
|
||||||
|
### Lokalisierung
|
||||||
|
|
||||||
|
Alle neuen Strings in `locales/en.json` **und** `locales/de.json`. Die Parität wird von
|
||||||
|
`Localization.Tests` erzwungen — beide Dateien müssen zusätzlich einzeln als JSON parsebar
|
||||||
|
bleiben, ein kaputtes `de.json` wird sonst still verschluckt.
|
||||||
|
|
||||||
|
## Fehlerbehandlung
|
||||||
|
|
||||||
|
| Fall | Verhalten |
|
||||||
|
|---|---|
|
||||||
|
| Base-URL nicht gesetzt | Feature komplett inaktiv, Menüeintrag versteckt |
|
||||||
|
| PAT fehlt/ungültig (401) | Import bricht mit Footer-Fehler ab; Write-back loggt Warnung |
|
||||||
|
| Scope fehlt (403) | Wie 401, Meldung nennt den fehlenden Scope |
|
||||||
|
| API nicht erreichbar | Timeout 10 s, Footer-Fehler, kein Retry |
|
||||||
|
| Write-back schlägt fehl | Warnung im Log, Task-Statuswechsel geht durch |
|
||||||
|
| Ticket im Ticketsystem gelöscht | PATCH liefert 404 → Warnung, `TicketRef` bleibt stehen |
|
||||||
|
|
||||||
|
Kein `catch {}` ohne Meldung — Nutzeraktionen, die scheitern, erscheinen im Footer-Strip.
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
Alle mit gefaktem `HttpMessageHandler`, kein echter Netzwerkaufruf, kein echtes `claude`:
|
||||||
|
|
||||||
|
- Status-Mapping: jeder `TaskStatus` → erwarteter Ticket-Status bzw. „kein Aufruf"
|
||||||
|
- Kein redundanter PATCH bei `Running → WaitingForReview`
|
||||||
|
- Kein Aufruf ohne `TicketRef`, ohne Base-URL, ohne PAT
|
||||||
|
- Write-back-Fehler (401/404/Timeout) lässt den Statuswechsel durchgehen
|
||||||
|
- Import: filtert korrekt auf Assignee + `StatusId == 1`
|
||||||
|
- Import: überspringt bereits importierte Tickets, legt keine Duplikate an
|
||||||
|
- `SetConfigAsync` erhält `TicketProjectId`, wenn ein anderer Writer die Config anfasst
|
||||||
|
- Locale-Parität en/de
|
||||||
|
|
||||||
|
## Manuelle Verifikation (nicht automatisierbar)
|
||||||
|
|
||||||
|
1. PAT in den Settings hinterlegen, „Verbindung testen" → korrekter Benutzername + Scopes.
|
||||||
|
2. Liste mit Projekt `393 Bandel.LagerApp` verknüpfen, „Update from Ticketsystem" → nur eigene,
|
||||||
|
offene Tickets erscheinen als Tasks.
|
||||||
|
3. Einen Task laufen lassen → Ticket steht im Ticketsystem auf `InBearbeitung`.
|
||||||
|
4. Approve/Merge → Ticket steht auf `Fertig`.
|
||||||
|
5. Base-URL leeren → Menüeintrag verschwindet, keine Netzwerkaufrufe mehr.
|
||||||
|
|
||||||
|
Punkte 1–4 bestätigen zugleich die aus dem Quellcode abgeleiteten Response-Shapes.
|
||||||
@@ -13,7 +13,6 @@
|
|||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
<!-- Converters -->
|
<!-- Converters -->
|
||||||
<converters:NotNullToBoolConverter x:Key="NotNullToBool"/>
|
|
||||||
<converters:StrikeIfTrueConverter x:Key="StrikeIfTrue"/>
|
<converters:StrikeIfTrueConverter x:Key="StrikeIfTrue"/>
|
||||||
<converters:EqStatusConverter x:Key="EqStatus"/>
|
<converters:EqStatusConverter x:Key="EqStatus"/>
|
||||||
<converters:UpperCaseConverter x:Key="UpperCase"/>
|
<converters:UpperCaseConverter x:Key="UpperCase"/>
|
||||||
|
|||||||
@@ -128,7 +128,6 @@ sealed class Program
|
|||||||
|
|
||||||
// Conflict-merge coordinator: single seam the shell wires to its resolver entry.
|
// Conflict-merge coordinator: single seam the shell wires to its resolver entry.
|
||||||
sc.AddSingleton<MergeCoordinator>();
|
sc.AddSingleton<MergeCoordinator>();
|
||||||
sc.AddSingleton<IMergeCoordinator>(sp => sp.GetRequiredService<MergeCoordinator>());
|
|
||||||
|
|
||||||
// ViewModels
|
// ViewModels
|
||||||
sc.AddTransient<DiffViewerViewModel>();
|
sc.AddTransient<DiffViewerViewModel>();
|
||||||
@@ -139,7 +138,7 @@ sealed class Program
|
|||||||
sc.AddTransient<MergeHelperSelectionModalViewModel>();
|
sc.AddTransient<MergeHelperSelectionModalViewModel>();
|
||||||
sc.AddSingleton<IPrimeScheduleApi, WorkerPrimeScheduleApi>();
|
sc.AddSingleton<IPrimeScheduleApi, WorkerPrimeScheduleApi>();
|
||||||
sc.AddSingleton<INotesApi, WorkerNotesApi>();
|
sc.AddSingleton<INotesApi, WorkerNotesApi>();
|
||||||
sc.AddSingleton<IOnlineLoginService, OnlineLoginService>();
|
sc.AddSingleton<OnlineLoginService>();
|
||||||
sc.AddTransient<PrimeClaudeTabViewModel>();
|
sc.AddTransient<PrimeClaudeTabViewModel>();
|
||||||
sc.AddTransient<SettingsModalViewModel>();
|
sc.AddTransient<SettingsModalViewModel>();
|
||||||
sc.AddTransient<MergeModalViewModel>();
|
sc.AddTransient<MergeModalViewModel>();
|
||||||
@@ -173,7 +172,7 @@ sealed class Program
|
|||||||
sp.GetRequiredService<IWorkerClient>(),
|
sp.GetRequiredService<IWorkerClient>(),
|
||||||
sp,
|
sp,
|
||||||
sp.GetRequiredService<INotesApi>(),
|
sp.GetRequiredService<INotesApi>(),
|
||||||
sp.GetRequiredService<IMergeCoordinator>()));
|
sp.GetRequiredService<MergeCoordinator>()));
|
||||||
sc.AddSingleton<UsagePillViewModel>(sp =>
|
sc.AddSingleton<UsagePillViewModel>(sp =>
|
||||||
new UsagePillViewModel(sp.GetRequiredService<IWorkerClient>()));
|
new UsagePillViewModel(sp.GetRequiredService<IWorkerClient>()));
|
||||||
sc.AddSingleton<MissionControlViewModel>(sp =>
|
sc.AddSingleton<MissionControlViewModel>(sp =>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ public sealed class AttachmentStore
|
|||||||
private readonly string _root;
|
private readonly string _root;
|
||||||
|
|
||||||
public AttachmentStore(string? root = null)
|
public AttachmentStore(string? root = null)
|
||||||
=> _root = root ?? Paths.Expand("~/.todo-app/attachments");
|
=> _root = root ?? Path.Combine(Paths.AppDataRoot(), "attachments");
|
||||||
|
|
||||||
public string Root => _root;
|
public string Root => _root;
|
||||||
|
|
||||||
|
|||||||
+31
-12
@@ -4,17 +4,19 @@ Shared data layer: models, repositories, SQLite infrastructure, and git operatio
|
|||||||
|
|
||||||
## Models
|
## Models
|
||||||
|
|
||||||
- **TaskEntity** — Id, ListId, Title, Description, Status, PlanningPhase, BlockedByTaskId (FK to predecessor in a chain), DependsOnTaskId (FK to a user/MCP-declared predecessor, distinct from BlockedByTaskId), ScheduledFor, Result, ReviewFeedback, LogPath, timestamps, CommitType, Model / SystemPrompt / AgentPath / MaxTurns (nullable overrides), IsStarred, IsMyDay, IsManual, Notes, ParentTaskId, PlanningSessionId / PlanningSessionToken / PlanningFinalizedAt, CreatedBy, HandlerBaseCommit / HandlerHeadCommit, InteractiveSessionId, Number (global immutable human-readable alias).
|
- **TaskEntity** — Id, ListId, Title, Description, Status, PlanningPhase, BlockedByTaskId (FK to predecessor in a chain), DependsOnTaskId (FK to a user/MCP-declared predecessor, distinct from BlockedByTaskId), ScheduledFor, Result, ReviewFeedback, LogPath, timestamps, CommitType, Model / SystemPrompt / AgentPath / MaxTurns / PermissionMode (nullable overrides), IsStarred, IsMyDay, IsManual, Notes, ParentTaskId, PlanningSessionId / PlanningSessionToken / PlanningFinalizedAt, CreatedBy, HandlerBaseCommit / HandlerHeadCommit, InteractiveSessionId, TicketRef, Number (global immutable human-readable alias).
|
||||||
|
- `TicketRef` (`ticket_ref`, nullable string) — link to an external ticket, format `<provider>:<id>` (currently always `bandel:<ticketId>`). Set by the ticket import, otherwise null. → `ClaudeDo.Worker/CLAUDE.md` Tickets section.
|
||||||
- Status / PlanningPhase / BlockedByTaskId / DependsOnTaskId semantics + allowed transitions: `ClaudeDo.Worker/CLAUDE.md` → Status Model.
|
- Status / PlanningPhase / BlockedByTaskId / DependsOnTaskId semantics + allowed transitions: `ClaudeDo.Worker/CLAUDE.md` → Status Model.
|
||||||
- `HandlerBaseCommit`/`HandlerHeadCommit` = the review range for a **worktree-less "list handler" host task** ("Let Claude handle it"), which commits straight into the list's working dir instead of a per-task worktree. Everything that reads a task's diff falls back to this pair whenever `Worktree` is null → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md).
|
- `HandlerBaseCommit`/`HandlerHeadCommit` = the review range for a **worktree-less "list handler" host task** ("Let Claude handle it"), which commits straight into the list's working dir instead of a per-task worktree. Everything that reads a task's diff falls back to this pair whenever `Worktree` is null → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md).
|
||||||
- `InteractiveSessionId` = the claude session id an embedded ConPTY interactive task session runs under, persisted by `InteractiveLaunchSpecService` before launch so a closed/aborted session can be resumed → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md).
|
- `InteractiveSessionId` = the claude session id an embedded ConPTY interactive task session runs under, persisted by `InteractiveLaunchSpecService` before launch so a closed/aborted session can be resumed → [conpty-sessions](../../docs/explore-notes/conpty-sessions.md).
|
||||||
- `Number` (INTEGER NOT NULL, unique index `idx_tasks_number`) — a global, monotonically increasing display alias for tasks. **Never reused**: deleting a task leaves a gap in numbering, ensuring that a task number that appears in a log or report always points to the same task (if it exists). Allocated by `TaskNumberAllocator.AddWithNumberAsync` on every insert via a persistent counter (`app_settings.next_task_number`). **Why not `MAX(number) + 1`:** deleting the highest-numbered task would free its number for reuse, breaking the immutability guarantee. The allocator uses an `UPDATE…RETURNING` statement to claim numbers atomically, retrying up to 5 times if a uniqueness collision occurs (the counter advances on each attempt, so retries always allocate fresh numbers). ⚠️ Tests use `EnsureCreated`, which bypasses migrations — the backfill needs a migration that runs `Migrate()` explicitly (not tested by default; see `worker-task-pipeline` notes).
|
- `Number` (INTEGER NOT NULL, unique index `idx_tasks_number`) — a global, monotonically increasing display alias for tasks. **Never reused**: deleting a task leaves a gap in numbering, ensuring that a task number that appears in a log or report always points to the same task (if it exists). Allocated by `TaskNumberAllocator.AddWithNumberAsync` on every insert via a persistent counter (`app_settings.next_task_number`). **Why not `MAX(number) + 1`:** deleting the highest-numbered task would free its number for reuse, breaking the immutability guarantee. The allocator uses an `UPDATE…RETURNING` statement to claim numbers atomically, retrying up to 5 times if a uniqueness collision occurs (the counter advances on each attempt, so retries always allocate fresh numbers). The one-time backfill for pre-existing rows lived in the `AddTaskNumbers` migration, squashed away 2026-08-26.
|
||||||
- Legacy status values `Manual`/`Planning`/`Planned`/`Draft`/`Waiting` were retired; existing rows backfill via the `RetireLegacyTaskStatus` migration.
|
- Legacy status values `Manual`/`Planning`/`Planned`/`Draft`/`Waiting` were retired. The backfill migration was squashed away (2026-08-26) — a database still holding those values can't be upgraded, see Schema below.
|
||||||
- **ListEntity** — Id, Name, WorkingDir, DefaultCommitType, CreatedAt, IsManual (reminder list — tasks created here default to `IsManual`)
|
- **ListEntity** — Id, Name, WorkingDir, DefaultCommitType, CreatedAt, IsManual (reminder list — tasks created here default to `IsManual`)
|
||||||
- **ListConfigEntity** — ListId (PK, 1:1), Model, SystemPrompt, AgentPath, MaxTurns, SessionSkills, VerifyCommand (all nullable). `VerifyCommand` is an optional post-merge gate; null/blank = no gate → [review-merge](../../docs/explore-notes/review-merge.md).
|
- **ListConfigEntity** — ListId (PK, 1:1), Model, SystemPrompt, AgentPath, MaxTurns, SessionSkills, VerifyCommand, PermissionMode, TicketProjectId (all nullable). `VerifyCommand` is an optional post-merge gate; null/blank = no gate → [review-merge](../../docs/explore-notes/review-merge.md). `PermissionMode` is null = inherit the global default; resolution order task → list → global lives in `EffectiveRunConfigResolver`. `TicketProjectId` (`ticket_project_id`) links the list to a project in the external ticket system; null = not linked → `ClaudeDo.Worker/CLAUDE.md` Tickets section.
|
||||||
|
- ⚠️ `ListRepository.SetConfigAsync` copies the entity **verbatim**, so every writer must carry the fields it doesn't own (`SessionSkills`, `PermissionMode`, `TicketProjectId`) or they silently reset. `UpdateListConfigDto.TicketProjectId` is tri-state (`null` = keep stored) for exactly that reason — only the list-settings modal sends an explicit value. This bit `PermissionMode` for real: its update-branch copy was missing from `SetConfigAsync` until `f0a3a186`, so a list's permission-mode override only ever stuck on the list's *first* save, never on a later one.
|
||||||
- **WorktreeEntity** — TaskId (PK, 1:1), Path, BranchName, BaseCommit, HeadCommit, DiffStat, MergeCommit (nullable — SHA of the merge commit this branch produced; the only thing making `revert_merge` possible without searching `git log`), State (`Active|Merged|Discarded|Kept`)
|
- **WorktreeEntity** — TaskId (PK, 1:1), Path, BranchName, BaseCommit, HeadCommit, DiffStat, MergeCommit (nullable — SHA of the merge commit this branch produced; the only thing making `revert_merge` possible without searching `git log`), State (`Active|Merged|Discarded|Kept`)
|
||||||
- **TaskRunEntity** — per-run record: session_id, turns, result, structured output, exit code, log path, nullable `Model` (what the run actually executed with), and `TokensIn`/`TokensOut`/`CacheReadTokens`/`CacheWriteTokens`. ⚠️ Token fields come from the **session transcript**, not the stream-json event, as a per-run delta → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md).
|
- **TaskRunEntity** — per-run record: session_id, turns, result, structured output, exit code, log path, nullable `Model` (what the run actually executed with), and `TokensIn`/`TokensOut`/`CacheReadTokens`/`CacheWriteTokens`. ⚠️ Token fields come from the **session transcript**, not the stream-json event, as a per-run delta → [usage-monitoring](../../docs/explore-notes/usage-monitoring.md).
|
||||||
- **PrimeScheduleEntity** — Id, Days (`[Flags] PrimeDays` weekday bitmask, column `days_of_week`), TimeOfDay, Enabled, LastRunAt, PromptOverride, CreatedAt. Recurs on selected weekdays; no date range.
|
- **PrimeScheduleEntity** — Id, Days (`[Flags] PrimeDays` weekday bitmask, column `days_of_week`), TimeOfDay, Enabled, LastRunAt, PromptOverride, Kind (`PrimeActionKind`, column `action_kind`, default `ping`), CreatedAt. Recurs on selected weekdays; no date range. `PromptOverride`'s role depends on `Kind`: ignored for `Ping`, appended to the daily-prep prompt for `FillMyDay`, and the entire prompt for `Custom`.
|
||||||
- **DailyNoteEntity** — Id, Date (DateOnly), Text, SortOrder, CreatedAt → `daily_notes`
|
- **DailyNoteEntity** — Id, Date (DateOnly), Text, SortOrder, CreatedAt → `daily_notes`
|
||||||
- **WeekReportEntity** — Id, StartDate/EndDate (DateOnly), Markdown, GeneratedAt → `week_reports`, unique index on (start_date, end_date)
|
- **WeekReportEntity** — Id, StartDate/EndDate (DateOnly), Markdown, GeneratedAt → `week_reports`, unique index on (start_date, end_date)
|
||||||
- **TaskAttachmentEntity** — Id, TaskId (FK, ON DELETE CASCADE), FileName, ByteSize, CreatedAt → `task_attachments`
|
- **TaskAttachmentEntity** — Id, TaskId (FK, ON DELETE CASCADE), FileName, ByteSize, CreatedAt → `task_attachments`
|
||||||
@@ -53,7 +55,7 @@ Worker's `QueuePicker` (`FromSqlRaw`), **not** here.
|
|||||||
- **TaskRepository** — CRUD, planning helpers (`CreateChildAsync`, `SetPlanningStartedAsync`, `DiscardPlanningAsync`, `UpdateChildAsync`), `UpdateAgentSettingsAsync`. ⚠️ Status-mutation primitives (`MarkRunningAsync`/`MarkDoneAsync`/`MarkFailedAsync`/`FlipAllRunningToFailedAsync`) are **`internal`** — only the Worker's `TaskStateService` may call them. `CreateChildAsync` produces children with `Status=Idle, PlanningPhase=None`. **Task-number allocation:** `AddAsync` (line 20) and `CreateChildAsync` (line 276) are the two sole task-creation paths; both call `TaskNumberAllocator.AddWithNumberAsync` to allocate a number atomically during the same transaction as the insert. Every other creation path (UI, MCP `add_task`, `batch_add_tasks`, Online Inbox sync, merge-helper handler tasks, planning children) routes through one of these two.
|
- **TaskRepository** — CRUD, planning helpers (`CreateChildAsync`, `SetPlanningStartedAsync`, `DiscardPlanningAsync`, `UpdateChildAsync`), `UpdateAgentSettingsAsync`. ⚠️ Status-mutation primitives (`MarkRunningAsync`/`MarkDoneAsync`/`MarkFailedAsync`/`FlipAllRunningToFailedAsync`) are **`internal`** — only the Worker's `TaskStateService` may call them. `CreateChildAsync` produces children with `Status=Idle, PlanningPhase=None`. **Task-number allocation:** `AddAsync` (line 20) and `CreateChildAsync` (line 276) are the two sole task-creation paths; both call `TaskNumberAllocator.AddWithNumberAsync` to allocate a number atomically during the same transaction as the insert. Every other creation path (UI, MCP `add_task`, `batch_add_tasks`, Online Inbox sync, merge-helper handler tasks, planning children) routes through one of these two.
|
||||||
- **ListRepository** — CRUD, `GetConfigAsync`/`SetConfigAsync` (upsert)/`DeleteConfigAsync` for `list_config`
|
- **ListRepository** — CRUD, `GetConfigAsync`/`SetConfigAsync` (upsert)/`DeleteConfigAsync` for `list_config`
|
||||||
- **WorktreeRepository** — CRUD, `UpdateHeadAsync`, `SetStateAsync`, `SetMergedAsync` (atomically sets State=Merged **and** stamps MergeCommit in one update — the only writer of MergeCommit)
|
- **WorktreeRepository** — CRUD, `UpdateHeadAsync`, `SetStateAsync`, `SetMergedAsync` (atomically sets State=Merged **and** stamps MergeCommit in one update — the only writer of MergeCommit)
|
||||||
- **TaskAttachmentRepository** — `AddAsync`, `UpdateAsync`, `GetAsync(taskId, fileName)`, `ListByTaskIdAsync`, `DeleteAsync(taskId, fileName)`, `DeleteAllForTaskAsync`
|
- **TaskAttachmentRepository** — `AddAsync`, `UpdateAsync`, `GetAsync(taskId, fileName)`, `ListByTaskIdAsync`, `DeleteAsync(taskId, fileName)`. Bulk delete-per-task is the `ON DELETE CASCADE` on `task_attachments`, not a repository method.
|
||||||
- **DailyNoteRepository**, **WeekReportRepository**, **TaskRunRepository**, **SubtaskRepository**, **AppSettingsRepository**
|
- **DailyNoteRepository**, **WeekReportRepository**, **TaskRunRepository**, **SubtaskRepository**, **AppSettingsRepository**
|
||||||
|
|
||||||
`TaskRepository.DeleteAsync` and `ListRepository.DeleteAsync` also delete the on-disk attachment
|
`TaskRepository.DeleteAsync` and `ListRepository.DeleteAsync` also delete the on-disk attachment
|
||||||
@@ -63,9 +65,9 @@ dir(s) via an optional `AttachmentStore` ctor param (defaults to the production
|
|||||||
|
|
||||||
- **ClaudeDoDbContext** — EF Core DbContext; WAL mode + foreign keys via `UseSqlite` options
|
- **ClaudeDoDbContext** — EF Core DbContext; WAL mode + foreign keys via `UseSqlite` options
|
||||||
- **IDbContextFactory\<ClaudeDoDbContext\>** — registered in DI; used by singleton consumers (e.g. the Worker hosted service)
|
- **IDbContextFactory\<ClaudeDoDbContext\>** — registered in DI; used by singleton consumers (e.g. the Worker hosted service)
|
||||||
- **Paths** — expands `~` and `%USERPROFILE%`, resolves relative paths. App root `~/.todo-app`
|
- **Paths** — expands `~` and `%USERPROFILE%`, resolves relative paths. App root `~/.claudeDo`
|
||||||
- **AppSettings** — loads `~/.todo-app/ui.config.json` (DbPath, SignalRUrl)
|
- **AppSettings** — loads `~/.claudeDo/ui.config.json` (DbPath, SignalRUrl)
|
||||||
- **AttachmentStore** — dependency-free file store, default root `~/.todo-app/attachments/<taskId>/`. `SaveAsync` enforces a 5 MB cap and a path-traversal/containment guard. Also `DeleteFile`, `DeleteTaskDir`, `TaskDir`, `Root`, `EnumerateTaskIds` (used by the worker orphan sweep). Attachment files live **outside** git worktrees intentionally.
|
- **AttachmentStore** — dependency-free file store, default root `~/.claudeDo/attachments/<taskId>/`. `SaveAsync` enforces a 5 MB cap and a path-traversal/containment guard. Also `DeleteFile`, `DeleteTaskDir`, `TaskDir`, `Root`, `EnumerateTaskIds` (used by the worker orphan sweep). Attachment files live **outside** git worktrees intentionally.
|
||||||
|
|
||||||
## Git
|
## Git
|
||||||
|
|
||||||
@@ -74,7 +76,7 @@ dir(s) via an optional `AttachmentStore` ctor param (defaults to the production
|
|||||||
- Worktrees: add (**serialized** to avoid a commondir race), remove, prune, list paths for branch
|
- Worktrees: add (**serialized** to avoid a commondir race), remove, prune, list paths for branch
|
||||||
- Branches: current, list local, checkout, delete
|
- Branches: current, list local, checkout, delete
|
||||||
- Staging/commit: status porcelain, add-all, add-path, commit via stdin
|
- Staging/commit: status porcelain, add-all, add-path, commit via stdin
|
||||||
- Diffs: working tree, branch vs base, commit range `base..head` (shows a merged task's diff after the worktree is gone), per-file, diff-stat, committed files, has-changes
|
- Diffs: working tree, branch vs base, commit range `base..head` (shows a merged task's diff after the worktree is gone), diff-stat, committed files, has-changes
|
||||||
- Merge: ff-only, no-ff, abort, mid-merge detection (`MERGE_HEAD`), conflicted files
|
- Merge: ff-only, no-ff, abort, mid-merge detection (`MERGE_HEAD`), conflicted files
|
||||||
- Revert: `RevertMergeCommitAsync` (`git revert --no-edit -m 1 <sha>`), `RevertAbortAsync`, `IsMidRevertAsync` (`REVERT_HEAD`, mirrors `IsMidMergeAsync`)
|
- Revert: `RevertMergeCommitAsync` (`git revert --no-edit -m 1 <sha>`), `RevertAbortAsync`, `IsMidRevertAsync` (`REVERT_HEAD`, mirrors `IsMidMergeAsync`)
|
||||||
- `PreviewMergeAsync` (non-destructive check via `git merge-tree --write-tree`), `CountChangedFilesAsync`, rev-parse, is-git-repo
|
- `PreviewMergeAsync` (non-destructive check via `git merge-tree --write-tree`), `CountChangedFilesAsync`, rev-parse, is-git-repo
|
||||||
@@ -97,8 +99,25 @@ Tables (one per line so parallel migrations don't collide on the same line):
|
|||||||
- `week_reports`
|
- `week_reports`
|
||||||
- `task_attachments`
|
- `task_attachments`
|
||||||
|
|
||||||
Managed by EF Core migrations in `Migrations/` — **`ls Migrations/` is the authoritative history**;
|
Managed by EF Core migrations in `Migrations/`. **The 40 incremental migrations were squashed into
|
||||||
don't maintain a changelog here. `tasks` holds `status`, `planning_phase` (default `none`),
|
a single `20260826094154_InitialCreate` on 2026-08-26** — the schema history is git history now,
|
||||||
|
not a migration chain. Consequences:
|
||||||
|
|
||||||
|
- `ClaudeDoDbContext.MigrateAndConfigure` **baselines** an existing database onto the squashed id
|
||||||
|
(pre-EF databases without a history, and databases whose history still lists the old chain ending
|
||||||
|
at `20260825063230_AddPrimeActionKind`). A database that stopped *mid*-chain can no longer be
|
||||||
|
upgraded and throws with a reinstall message instead of being stamped onto a schema it lacks.
|
||||||
|
Covered by `MigrationBaselineTests` — the only test that runs a real `Migrate()` (every other
|
||||||
|
Data.Tests fixture uses `EnsureCreated`, which skips migrations entirely). Its fixture builds the
|
||||||
|
legacy database by migrating **to** `InitialCreate` and seeding rows with raw SQL: `EnsureCreated`
|
||||||
|
would build *today's* schema, so every post-squash migration would then re-add an existing column
|
||||||
|
("duplicate column name"). Assert "nothing pending", never "InitialCreate is the only history row".
|
||||||
|
- Don't hand-edit the squashed migration; add new ones on top as usual.
|
||||||
|
`dotnet ef migrations add <Name> --project src/ClaudeDo.Data/ClaudeDo.Data.csproj --configuration
|
||||||
|
Release` — `Data` is its own startup project (it holds the `Design` package and a design-time
|
||||||
|
factory), and `--configuration Release` is needed because a running Worker locks `Debug`.
|
||||||
|
|
||||||
|
`tasks` holds `status`, `planning_phase` (default `none`),
|
||||||
`blocked_by_task_id` (FK to `tasks.id`, `ON DELETE SET NULL`), and `depends_on_task_id` (same FK
|
`blocked_by_task_id` (FK to `tasks.id`, `ON DELETE SET NULL`), and `depends_on_task_id` (same FK
|
||||||
shape, but a separate column — see Worker/CLAUDE.md → Status Model for why it isn't unified with
|
shape, but a separate column — see Worker/CLAUDE.md → Status Model for why it isn't unified with
|
||||||
`blocked_by_task_id`).
|
`blocked_by_task_id`).
|
||||||
|
|||||||
@@ -73,11 +73,19 @@ public class ClaudeDoDbContext : DbContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The 40 incremental migrations were squashed into a single InitialCreate on 2026-08-26.
|
||||||
|
// Any database that already carries the full pre-squash schema has to be re-stamped to the
|
||||||
|
// squashed id, or Migrate() would run CREATE TABLE over live tables.
|
||||||
|
private const string SquashedMigrationId = "20260826094154_InitialCreate";
|
||||||
|
private const string LastPreSquashMigrationId = "20260825063230_AddPrimeActionKind";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies EF Core migrations and sets WAL mode. Safe for both fresh and existing databases.
|
/// Applies EF Core migrations and sets WAL mode. Safe for both fresh and existing databases.
|
||||||
/// Existing databases (created by the old schema.sql) have their tables but no
|
/// Existing databases are baselined onto <see cref="SquashedMigrationId"/> instead of being
|
||||||
/// __EFMigrationsHistory — this method detects that case and baselines the initial
|
/// re-created: ones with tables but no __EFMigrationsHistory (created by the old schema.sql),
|
||||||
/// migration so EF skips re-creating tables that already exist.
|
/// and ones whose history still lists the pre-squash chain. A database that stopped *mid*-chain
|
||||||
|
/// can no longer be upgraded — the incremental migrations are gone — and throws instead of
|
||||||
|
/// being silently stamped onto a schema it doesn't have.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void MigrateAndConfigure(ClaudeDoDbContext db)
|
public static void MigrateAndConfigure(ClaudeDoDbContext db)
|
||||||
{
|
{
|
||||||
@@ -101,8 +109,6 @@ public class ClaudeDoDbContext : DbContext
|
|||||||
fkCmd.ExecuteNonQuery();
|
fkCmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the 'lists' table exists but __EFMigrationsHistory does not,
|
|
||||||
// this is a pre-EF database. Baseline the InitialCreate migration.
|
|
||||||
using (var cmd = conn.CreateCommand())
|
using (var cmd = conn.CreateCommand())
|
||||||
{
|
{
|
||||||
cmd.CommandText = "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='lists'";
|
cmd.CommandText = "SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='lists'";
|
||||||
@@ -113,16 +119,42 @@ public class ClaudeDoDbContext : DbContext
|
|||||||
|
|
||||||
if (hasLists && !hasHistory)
|
if (hasLists && !hasHistory)
|
||||||
{
|
{
|
||||||
cmd.CommandText = """
|
// Pre-EF database: tables, no history at all.
|
||||||
|
cmd.CommandText = $"""
|
||||||
CREATE TABLE "__EFMigrationsHistory" (
|
CREATE TABLE "__EFMigrationsHistory" (
|
||||||
"MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
|
"MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
|
||||||
"ProductVersion" TEXT NOT NULL
|
"ProductVersion" TEXT NOT NULL
|
||||||
);
|
);
|
||||||
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
|
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
|
||||||
VALUES ('20260416064948_InitialCreate', '8.0.11');
|
VALUES ('{SquashedMigrationId}', '8.0.11');
|
||||||
""";
|
""";
|
||||||
cmd.ExecuteNonQuery();
|
cmd.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
else if (hasLists && hasHistory)
|
||||||
|
{
|
||||||
|
cmd.CommandText = $"""SELECT COUNT(*) FROM "__EFMigrationsHistory" WHERE "MigrationId" = '{SquashedMigrationId}'""";
|
||||||
|
var alreadySquashed = Convert.ToInt64(cmd.ExecuteScalar()) > 0;
|
||||||
|
|
||||||
|
if (!alreadySquashed)
|
||||||
|
{
|
||||||
|
cmd.CommandText = """SELECT MAX("MigrationId") FROM "__EFMigrationsHistory" """;
|
||||||
|
var newest = cmd.ExecuteScalar() as string ?? "";
|
||||||
|
|
||||||
|
if (newest != LastPreSquashMigrationId)
|
||||||
|
throw new InvalidOperationException(
|
||||||
|
$"This database was last migrated by '{newest}', but the migration history was " +
|
||||||
|
$"squashed into '{SquashedMigrationId}' and the incremental migrations no longer " +
|
||||||
|
"exist. Reinstall ClaudeDo against a fresh database (or restore a backup taken " +
|
||||||
|
$"after '{LastPreSquashMigrationId}').");
|
||||||
|
|
||||||
|
cmd.CommandText = $"""
|
||||||
|
DELETE FROM "__EFMigrationsHistory";
|
||||||
|
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
|
||||||
|
VALUES ('{SquashedMigrationId}', '8.0.11');
|
||||||
|
""";
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ public class AppSettingsEntityConfiguration : IEntityTypeConfiguration<AppSettin
|
|||||||
builder.Property(s => s.UsageThrottleSevenDayHardPct)
|
builder.Property(s => s.UsageThrottleSevenDayHardPct)
|
||||||
.HasColumnName("usage_throttle_seven_day_hard_pct").IsRequired().HasDefaultValue(65);
|
.HasColumnName("usage_throttle_seven_day_hard_pct").IsRequired().HasDefaultValue(65);
|
||||||
|
|
||||||
|
builder.Property(s => s.AutoContinueOnUsageLimit)
|
||||||
|
.HasColumnName("auto_continue_on_usage_limit").IsRequired().HasDefaultValue(false);
|
||||||
|
|
||||||
builder.HasData(new AppSettingsEntity { Id = AppSettingsEntity.SingletonId });
|
builder.HasData(new AppSettingsEntity { Id = AppSettingsEntity.SingletonId });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class ListConfigEntityConfiguration : IEntityTypeConfiguration<ListConfig
|
|||||||
builder.Property(c => c.MaxTurns).HasColumnName("max_turns");
|
builder.Property(c => c.MaxTurns).HasColumnName("max_turns");
|
||||||
builder.Property(c => c.SessionSkills).HasColumnName("session_skills");
|
builder.Property(c => c.SessionSkills).HasColumnName("session_skills");
|
||||||
builder.Property(c => c.VerifyCommand).HasColumnName("verify_command");
|
builder.Property(c => c.VerifyCommand).HasColumnName("verify_command");
|
||||||
builder.Property(c => c.SerializeOnFileOverlap).HasColumnName("serialize_on_file_overlap")
|
builder.Property(c => c.PermissionMode).HasColumnName("permission_mode");
|
||||||
.IsRequired().HasDefaultValue(false);
|
builder.Property(c => c.TicketProjectId).HasColumnName("ticket_project_id");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class ListEntityConfiguration : IEntityTypeConfiguration<ListEntity>
|
|||||||
builder.Property(l => l.SortOrder).HasColumnName("sort_order").IsRequired().HasDefaultValue(0);
|
builder.Property(l => l.SortOrder).HasColumnName("sort_order").IsRequired().HasDefaultValue(0);
|
||||||
builder.Property(l => l.IsManual).HasColumnName("is_manual").IsRequired().HasDefaultValue(false);
|
builder.Property(l => l.IsManual).HasColumnName("is_manual").IsRequired().HasDefaultValue(false);
|
||||||
builder.Property(l => l.FindingsTracked).HasColumnName("findings_tracked").IsRequired().HasDefaultValue(false);
|
builder.Property(l => l.FindingsTracked).HasColumnName("findings_tracked").IsRequired().HasDefaultValue(false);
|
||||||
|
builder.Property(l => l.Icon).HasColumnName("icon");
|
||||||
|
|
||||||
builder.HasIndex(l => l.SortOrder).HasDatabaseName("idx_lists_sort");
|
builder.HasIndex(l => l.SortOrder).HasDatabaseName("idx_lists_sort");
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,27 @@
|
|||||||
using ClaudeDo.Data.Models;
|
using ClaudeDo.Data.Models;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Configuration;
|
namespace ClaudeDo.Data.Configuration;
|
||||||
|
|
||||||
public class PrimeScheduleEntityConfiguration : IEntityTypeConfiguration<PrimeScheduleEntity>
|
public class PrimeScheduleEntityConfiguration : IEntityTypeConfiguration<PrimeScheduleEntity>
|
||||||
{
|
{
|
||||||
|
private static string KindToString(PrimeActionKind v)
|
||||||
|
=> v == PrimeActionKind.Ping ? "ping"
|
||||||
|
: v == PrimeActionKind.FillMyDay ? "fill_my_day"
|
||||||
|
: v == PrimeActionKind.Custom ? "custom"
|
||||||
|
: throw new ArgumentOutOfRangeException(nameof(v));
|
||||||
|
|
||||||
|
private static PrimeActionKind KindFromString(string v)
|
||||||
|
=> v == "ping" ? PrimeActionKind.Ping
|
||||||
|
: v == "fill_my_day" ? PrimeActionKind.FillMyDay
|
||||||
|
: v == "custom" ? PrimeActionKind.Custom
|
||||||
|
: throw new ArgumentOutOfRangeException(nameof(v));
|
||||||
|
|
||||||
|
private static readonly ValueConverter<PrimeActionKind, string> KindConverter =
|
||||||
|
new(v => KindToString(v), v => KindFromString(v));
|
||||||
|
|
||||||
public void Configure(EntityTypeBuilder<PrimeScheduleEntity> builder)
|
public void Configure(EntityTypeBuilder<PrimeScheduleEntity> builder)
|
||||||
{
|
{
|
||||||
builder.ToTable("prime_schedules");
|
builder.ToTable("prime_schedules");
|
||||||
@@ -15,6 +31,9 @@ public class PrimeScheduleEntityConfiguration : IEntityTypeConfiguration<PrimeSc
|
|||||||
|
|
||||||
builder.Property(s => s.Days).HasColumnName("days_of_week")
|
builder.Property(s => s.Days).HasColumnName("days_of_week")
|
||||||
.IsRequired().HasDefaultValue(PrimeDays.Weekdays);
|
.IsRequired().HasDefaultValue(PrimeDays.Weekdays);
|
||||||
|
builder.Property(s => s.Kind).HasColumnName("action_kind")
|
||||||
|
.IsRequired().HasDefaultValue(PrimeActionKind.Ping)
|
||||||
|
.HasConversion(KindConverter);
|
||||||
builder.Property(s => s.TimeOfDay).HasColumnName("time_of_day").IsRequired();
|
builder.Property(s => s.TimeOfDay).HasColumnName("time_of_day").IsRequired();
|
||||||
builder.Property(s => s.Enabled).HasColumnName("enabled").IsRequired().HasDefaultValue(true);
|
builder.Property(s => s.Enabled).HasColumnName("enabled").IsRequired().HasDefaultValue(true);
|
||||||
builder.Property(s => s.LastRunAt).HasColumnName("last_run_at");
|
builder.Property(s => s.LastRunAt).HasColumnName("last_run_at");
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public class TaskEntityConfiguration : IEntityTypeConfiguration<TaskEntity>
|
|||||||
builder.Property(t => t.FailureReason).HasColumnName("failure_reason");
|
builder.Property(t => t.FailureReason).HasColumnName("failure_reason");
|
||||||
builder.Property(t => t.FailureTurnsUsed).HasColumnName("failure_turns_used");
|
builder.Property(t => t.FailureTurnsUsed).HasColumnName("failure_turns_used");
|
||||||
builder.Property(t => t.FailureMaxTurns).HasColumnName("failure_max_turns");
|
builder.Property(t => t.FailureMaxTurns).HasColumnName("failure_max_turns");
|
||||||
|
builder.Property(t => t.UsageLimitAutoContinuedAt).HasColumnName("usage_limit_auto_continued_at");
|
||||||
builder.Property(t => t.LogPath).HasColumnName("log_path");
|
builder.Property(t => t.LogPath).HasColumnName("log_path");
|
||||||
builder.Property(t => t.CreatedAt).HasColumnName("created_at").IsRequired();
|
builder.Property(t => t.CreatedAt).HasColumnName("created_at").IsRequired();
|
||||||
builder.Property(t => t.StartedAt).HasColumnName("started_at");
|
builder.Property(t => t.StartedAt).HasColumnName("started_at");
|
||||||
@@ -92,16 +93,17 @@ public class TaskEntityConfiguration : IEntityTypeConfiguration<TaskEntity>
|
|||||||
builder.Property(t => t.SystemPrompt).HasColumnName("system_prompt");
|
builder.Property(t => t.SystemPrompt).HasColumnName("system_prompt");
|
||||||
builder.Property(t => t.AgentPath).HasColumnName("agent_path");
|
builder.Property(t => t.AgentPath).HasColumnName("agent_path");
|
||||||
builder.Property(t => t.MaxTurns).HasColumnName("max_turns");
|
builder.Property(t => t.MaxTurns).HasColumnName("max_turns");
|
||||||
|
builder.Property(t => t.PermissionMode).HasColumnName("permission_mode");
|
||||||
builder.Property(t => t.IsStarred).HasColumnName("is_starred").HasDefaultValue(false);
|
builder.Property(t => t.IsStarred).HasColumnName("is_starred").HasDefaultValue(false);
|
||||||
builder.Property(t => t.IsMyDay).HasColumnName("is_my_day").HasDefaultValue(false);
|
builder.Property(t => t.IsMyDay).HasColumnName("is_my_day").HasDefaultValue(false);
|
||||||
builder.Property(t => t.IsManual).HasColumnName("is_manual").HasDefaultValue(false);
|
builder.Property(t => t.IsManual).HasColumnName("is_manual").HasDefaultValue(false);
|
||||||
builder.Property(t => t.Notes).HasColumnName("notes");
|
builder.Property(t => t.Notes).HasColumnName("notes");
|
||||||
builder.Property(t => t.SortOrder).HasColumnName("sort_order").IsRequired().HasDefaultValue(0);
|
builder.Property(t => t.SortOrder).HasColumnName("sort_order").IsRequired().HasDefaultValue(0);
|
||||||
builder.Property(t => t.SessionSkills).HasColumnName("session_skills");
|
builder.Property(t => t.SessionSkills).HasColumnName("session_skills");
|
||||||
builder.Property(t => t.ScopeGlobs).HasColumnName("scope_globs");
|
|
||||||
builder.Property(t => t.HandlerBaseCommit).HasColumnName("handler_base_commit");
|
builder.Property(t => t.HandlerBaseCommit).HasColumnName("handler_base_commit");
|
||||||
builder.Property(t => t.HandlerHeadCommit).HasColumnName("handler_head_commit");
|
builder.Property(t => t.HandlerHeadCommit).HasColumnName("handler_head_commit");
|
||||||
builder.Property(t => t.InteractiveSessionId).HasColumnName("interactive_session_id");
|
builder.Property(t => t.InteractiveSessionId).HasColumnName("interactive_session_id");
|
||||||
|
builder.Property(t => t.TicketRef).HasColumnName("ticket_ref");
|
||||||
|
|
||||||
builder.Property(t => t.ParentTaskId).HasColumnName("parent_task_id");
|
builder.Property(t => t.ParentTaskId).HasColumnName("parent_task_id");
|
||||||
builder.Property(t => t.PlanningSessionId).HasColumnName("planning_session_id");
|
builder.Property(t => t.PlanningSessionId).HasColumnName("planning_session_id");
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
using System.Linq.Expressions;
|
|
||||||
using ClaudeDo.Data.Models;
|
|
||||||
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Filtering.Filters;
|
|
||||||
|
|
||||||
public sealed class ReviewFilter : TaskListFilterBase
|
|
||||||
{
|
|
||||||
public override string Id => "virtual:review";
|
|
||||||
protected override Expression<Func<TaskEntity, bool>> MatchExpr => t => t.Status == TaskStatus.WaitingForReview;
|
|
||||||
public override bool ShouldCount(TaskEntity t) => Matches(t);
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System.Linq.Expressions;
|
|
||||||
using ClaudeDo.Data.Models;
|
|
||||||
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Filtering.Filters;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Filter for a smart list keyed off a boolean/nullable task flag
|
|
||||||
/// (My Day, Important, Planned). Counts only non-done matches.
|
|
||||||
/// </summary>
|
|
||||||
public sealed class SmartFlagFilter(string id, Expression<Func<TaskEntity, bool>> flag) : TaskListFilterBase
|
|
||||||
{
|
|
||||||
private readonly Func<TaskEntity, bool> _flag = flag.Compile();
|
|
||||||
|
|
||||||
public override string Id => id;
|
|
||||||
protected override Expression<Func<TaskEntity, bool>> MatchExpr => flag;
|
|
||||||
public override bool ShouldCount(TaskEntity t) => _flag(t) && t.Status != TaskStatus.Done;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
using System.Linq.Expressions;
|
|
||||||
using ClaudeDo.Data.Models;
|
|
||||||
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Filtering.Filters;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Virtual list filter matching tasks by a single status (Queued, Running).
|
|
||||||
/// Planning parents appear contextually when they host a matching child.
|
|
||||||
/// </summary>
|
|
||||||
public sealed class StatusFilter(string id, TaskStatus status) : TaskListFilterBase
|
|
||||||
{
|
|
||||||
public override string Id => id;
|
|
||||||
protected override Expression<Func<TaskEntity, bool>> MatchExpr => t => t.Status == status;
|
|
||||||
public override bool ShouldCount(TaskEntity t) => t.Status == status;
|
|
||||||
public override bool MatchesAsContext(TaskEntity t, IReadOnlyList<TaskEntity> all) =>
|
|
||||||
PlanningRules.IsPlanningParent(t) &&
|
|
||||||
PlanningRules.HasMatchingChild(t, all, c => c.Status == status);
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
using System.Linq.Expressions;
|
|
||||||
using ClaudeDo.Data.Models;
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Filtering.Filters;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Base for <see cref="ITaskListFilter"/> implementations: subclasses express their
|
|
||||||
/// primary-match condition once as an expression tree (<see cref="MatchExpr"/>), which
|
|
||||||
/// doubles as a SQL-translatable predicate (<see cref="MatchExpression"/>) and, compiled
|
|
||||||
/// on first use, as the in-memory <see cref="Matches"/> predicate.
|
|
||||||
/// </summary>
|
|
||||||
public abstract class TaskListFilterBase : ITaskListFilter
|
|
||||||
{
|
|
||||||
private Func<TaskEntity, bool>? _compiled;
|
|
||||||
|
|
||||||
public abstract string Id { get; }
|
|
||||||
|
|
||||||
protected abstract Expression<Func<TaskEntity, bool>> MatchExpr { get; }
|
|
||||||
|
|
||||||
public Expression<Func<TaskEntity, bool>> MatchExpression => MatchExpr;
|
|
||||||
|
|
||||||
public bool Matches(TaskEntity t) => (_compiled ??= MatchExpr.Compile())(t);
|
|
||||||
|
|
||||||
public abstract bool ShouldCount(TaskEntity t);
|
|
||||||
|
|
||||||
public virtual bool MatchesAsContext(TaskEntity t, IReadOnlyList<TaskEntity> all) => false;
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
using System.Linq.Expressions;
|
|
||||||
using ClaudeDo.Data.Models;
|
|
||||||
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Filtering.Filters;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Filter for any user-defined list. Constructed on demand from the list id —
|
|
||||||
/// one instance per list.
|
|
||||||
/// </summary>
|
|
||||||
public sealed class UserListFilter : TaskListFilterBase
|
|
||||||
{
|
|
||||||
private readonly string _listId;
|
|
||||||
|
|
||||||
public UserListFilter(string listId)
|
|
||||||
{
|
|
||||||
_listId = listId;
|
|
||||||
Id = $"user:{listId}";
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Id { get; }
|
|
||||||
protected override Expression<Func<TaskEntity, bool>> MatchExpr => t => t.ListId == _listId;
|
|
||||||
public override bool ShouldCount(TaskEntity t) => t.ListId == _listId && t.Status != TaskStatus.Done;
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using System.Linq.Expressions;
|
|
||||||
using ClaudeDo.Data.Models;
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Filtering;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Strategy that defines which tasks belong to a single list. One implementation
|
|
||||||
/// per list kind; consumers (counters, list loader) ask the registry for the
|
|
||||||
/// right strategy and never branch on the list id themselves.
|
|
||||||
/// </summary>
|
|
||||||
public interface ITaskListFilter
|
|
||||||
{
|
|
||||||
/// <summary>The list id this filter applies to (e.g. "virtual:queued", "user:abc").</summary>
|
|
||||||
string Id { get; }
|
|
||||||
|
|
||||||
/// <summary>True if <paramref name="t"/> is a primary citizen of this list — appears as a row.</summary>
|
|
||||||
bool Matches(TaskEntity t);
|
|
||||||
|
|
||||||
/// <summary>The primary-match predicate as an expression tree, so EF Core can push it into SQL.</summary>
|
|
||||||
Expression<Func<TaskEntity, bool>> MatchExpression { get; }
|
|
||||||
|
|
||||||
/// <summary>True if <paramref name="t"/> should be counted in this list's badge.</summary>
|
|
||||||
bool ShouldCount(TaskEntity t);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// True if <paramref name="t"/> is shown as a contextual row (not a primary citizen,
|
|
||||||
/// but appears to host children that match). Default: nothing extra.
|
|
||||||
/// </summary>
|
|
||||||
bool MatchesAsContext(TaskEntity t, IReadOnlyList<TaskEntity> all) => false;
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,84 @@
|
|||||||
using ClaudeDo.Data.Filtering.Filters;
|
using System.Linq.Expressions;
|
||||||
|
using ClaudeDo.Data.Models;
|
||||||
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Filtering;
|
namespace ClaudeDo.Data.Filtering;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Strategy that defines which tasks belong to a single list. One subclass per list kind;
|
||||||
|
/// consumers (counters, list loader) ask the registry for the right strategy and never branch
|
||||||
|
/// on the list id themselves.
|
||||||
|
///
|
||||||
|
/// Subclasses express their primary-match condition once as an expression tree
|
||||||
|
/// (<see cref="MatchExpression"/>), which doubles as a SQL-translatable predicate for EF Core
|
||||||
|
/// and, compiled on first use, as the in-memory <see cref="Matches"/> predicate.
|
||||||
|
/// </summary>
|
||||||
|
public abstract class TaskListFilter
|
||||||
|
{
|
||||||
|
private Func<TaskEntity, bool>? _compiled;
|
||||||
|
|
||||||
|
/// <summary>The list id this filter applies to (e.g. "virtual:queued", "user:abc").</summary>
|
||||||
|
public abstract string Id { get; }
|
||||||
|
|
||||||
|
/// <summary>The primary-match predicate as an expression tree, so EF Core can push it into SQL.</summary>
|
||||||
|
public abstract Expression<Func<TaskEntity, bool>> MatchExpression { get; }
|
||||||
|
|
||||||
|
/// <summary>True if <paramref name="t"/> is a primary citizen of this list — appears as a row.</summary>
|
||||||
|
public bool Matches(TaskEntity t) => (_compiled ??= MatchExpression.Compile())(t);
|
||||||
|
|
||||||
|
/// <summary>True if <paramref name="t"/> should be counted in this list's badge.</summary>
|
||||||
|
public abstract bool ShouldCount(TaskEntity t);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// True if <paramref name="t"/> is shown as a contextual row (not a primary citizen,
|
||||||
|
/// but appears to host children that match). Default: nothing extra.
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool MatchesAsContext(TaskEntity t, IReadOnlyList<TaskEntity> all) => false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Filter for a smart list keyed off a boolean/nullable task flag
|
||||||
|
/// (My Day, Important, Planned). Counts only non-done matches.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class SmartFlagFilter(string id, Expression<Func<TaskEntity, bool>> flag) : TaskListFilter
|
||||||
|
{
|
||||||
|
public override string Id => id;
|
||||||
|
public override Expression<Func<TaskEntity, bool>> MatchExpression => flag;
|
||||||
|
public override bool ShouldCount(TaskEntity t) => Matches(t) && t.Status != TaskStatus.Done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Virtual list filter matching tasks by a single status (Queued, Running).
|
||||||
|
/// Planning parents appear contextually when they host a matching child.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class StatusFilter(string id, TaskStatus status) : TaskListFilter
|
||||||
|
{
|
||||||
|
public override string Id => id;
|
||||||
|
public override Expression<Func<TaskEntity, bool>> MatchExpression => t => t.Status == status;
|
||||||
|
public override bool ShouldCount(TaskEntity t) => t.Status == status;
|
||||||
|
public override bool MatchesAsContext(TaskEntity t, IReadOnlyList<TaskEntity> all) =>
|
||||||
|
PlanningRules.IsPlanningParent(t) &&
|
||||||
|
PlanningRules.HasMatchingChild(t, all, c => c.Status == status);
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class ReviewFilter : TaskListFilter
|
||||||
|
{
|
||||||
|
public override string Id => "virtual:review";
|
||||||
|
public override Expression<Func<TaskEntity, bool>> MatchExpression => t => t.Status == TaskStatus.WaitingForReview;
|
||||||
|
public override bool ShouldCount(TaskEntity t) => Matches(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Filter for any user-defined list. Constructed on demand from the list id —
|
||||||
|
/// one instance per list.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class UserListFilter(string listId) : TaskListFilter
|
||||||
|
{
|
||||||
|
public override string Id { get; } = $"user:{listId}";
|
||||||
|
public override Expression<Func<TaskEntity, bool>> MatchExpression => t => t.ListId == listId;
|
||||||
|
public override bool ShouldCount(TaskEntity t) => t.ListId == listId && t.Status != TaskStatus.Done;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolves a list id (e.g. "virtual:queued", "user:abc") to the filter that
|
/// Resolves a list id (e.g. "virtual:queued", "user:abc") to the filter that
|
||||||
/// owns its semantics. Smart and virtual filters are singletons; user-list
|
/// owns its semantics. Smart and virtual filters are singletons; user-list
|
||||||
@@ -12,8 +88,8 @@ public sealed class TaskListFilterRegistry
|
|||||||
{
|
{
|
||||||
public const string UserListPrefix = "user:";
|
public const string UserListPrefix = "user:";
|
||||||
|
|
||||||
private static readonly IReadOnlyDictionary<string, ITaskListFilter> BuiltIn =
|
private static readonly IReadOnlyDictionary<string, TaskListFilter> BuiltIn =
|
||||||
new Dictionary<string, ITaskListFilter>(StringComparer.Ordinal)
|
new Dictionary<string, TaskListFilter>(StringComparer.Ordinal)
|
||||||
{
|
{
|
||||||
["smart:my-day"] = new SmartFlagFilter("smart:my-day", t => t.IsMyDay),
|
["smart:my-day"] = new SmartFlagFilter("smart:my-day", t => t.IsMyDay),
|
||||||
["smart:important"] = new SmartFlagFilter("smart:important", t => t.IsStarred),
|
["smart:important"] = new SmartFlagFilter("smart:important", t => t.IsStarred),
|
||||||
@@ -26,7 +102,7 @@ public sealed class TaskListFilterRegistry
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resolve a filter for a list id, or null if the id is unknown.
|
/// Resolve a filter for a list id, or null if the id is unknown.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ITaskListFilter? Resolve(string listId)
|
public TaskListFilter? Resolve(string listId)
|
||||||
{
|
{
|
||||||
if (BuiltIn.TryGetValue(listId, out var f)) return f;
|
if (BuiltIn.TryGetValue(listId, out var f)) return f;
|
||||||
if (listId.StartsWith(UserListPrefix, StringComparison.Ordinal))
|
if (listId.StartsWith(UserListPrefix, StringComparison.Ordinal))
|
||||||
|
|||||||
@@ -215,15 +215,6 @@ public sealed class GitService
|
|||||||
args.AddRange(paths);
|
args.AddRange(paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<string> GetFileDiffAsync(string worktreePath, string? baseCommit, string relativePath, CancellationToken ct = default)
|
|
||||||
{
|
|
||||||
string[] args = string.IsNullOrEmpty(baseCommit)
|
|
||||||
? ["diff", "--", relativePath]
|
|
||||||
: ["diff", $"{baseCommit}..HEAD", "--", relativePath];
|
|
||||||
var (_, stdout, _) = await RunGitAsync(worktreePath, args, ct);
|
|
||||||
return stdout;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task WorktreeRemoveAsync(string repoDir, string worktreePath, bool force = false, CancellationToken ct = default)
|
public async Task WorktreeRemoveAsync(string repoDir, string worktreePath, bool force = false, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
var args = new List<string> { "worktree", "remove" };
|
var args = new List<string> { "worktree", "remove" };
|
||||||
@@ -365,6 +356,38 @@ public sealed class GitService
|
|||||||
throw new InvalidOperationException($"git revert --abort failed (exit {exitCode}): {stderr}");
|
throw new InvalidOperationException($"git revert --abort failed (exit {exitCode}): {stderr}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Re-applies a merge commit's own diff (against its first parent, `-m 1`) as a new commit on
|
||||||
|
/// top of HEAD. Needed to redo a merge that was previously reverted: once a branch tip is an
|
||||||
|
/// ancestor of HEAD, `git merge` on that branch again is a silent "Already up to date." no-op
|
||||||
|
/// (ancestry, not content, is what merge checks) -- cherry-picking the original merge commit's
|
||||||
|
/// diff is what actually restores the content.
|
||||||
|
/// </summary>
|
||||||
|
public async Task<(int ExitCode, string Stderr)> CherryPickMergeCommitAsync(
|
||||||
|
string repoDir, string mergeCommitSha, CancellationToken ct = default)
|
||||||
|
{
|
||||||
|
var (exitCode, _, stderr) = await RunGitAsync(repoDir,
|
||||||
|
["-c", "merge.conflictStyle=diff3", "cherry-pick", "-m", "1", "--no-edit", mergeCommitSha], ct);
|
||||||
|
return (exitCode, stderr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> IsMidCherryPickAsync(string repoDir, CancellationToken ct = default)
|
||||||
|
{
|
||||||
|
var (exitCode, stdout, _) = await RunGitAsync(repoDir, ["rev-parse", "--git-dir"], ct);
|
||||||
|
if (exitCode != 0) return false;
|
||||||
|
var gitDir = stdout.Trim();
|
||||||
|
if (!Path.IsPathRooted(gitDir))
|
||||||
|
gitDir = Path.Combine(repoDir, gitDir);
|
||||||
|
return File.Exists(Path.Combine(gitDir, "CHERRY_PICK_HEAD"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task CherryPickAbortAsync(string repoDir, CancellationToken ct = default)
|
||||||
|
{
|
||||||
|
var (exitCode, _, stderr) = await RunGitAsync(repoDir, ["cherry-pick", "--abort"], ct);
|
||||||
|
if (exitCode != 0)
|
||||||
|
throw new InvalidOperationException($"git cherry-pick --abort failed (exit {exitCode}): {stderr}");
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<List<string>> ListConflictedFilesAsync(string repoDir, CancellationToken ct = default)
|
public async Task<List<string>> ListConflictedFilesAsync(string repoDir, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
var (exitCode, stdout, stderr) = await RunGitAsync(repoDir,
|
var (exitCode, stdout, stderr) = await RunGitAsync(repoDir,
|
||||||
@@ -385,6 +408,32 @@ public sealed class GitService
|
|||||||
throw new InvalidOperationException($"git add '{path}' failed (exit {exitCode}): {stderr}");
|
throw new InvalidOperationException($"git add '{path}' failed (exit {exitCode}): {stderr}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stages <paramref name="path"/> as deleted (`git rm -f`), removing it from both the index
|
||||||
|
/// and, if present, the working tree. Used to resolve a merge conflict to "keep the
|
||||||
|
/// deletion" — unlike <see cref="AddPathAsync"/>, which would stage an empty file as a
|
||||||
|
/// tracked, zero-byte file rather than actually removing it.
|
||||||
|
/// </summary>
|
||||||
|
public async Task RemovePathAsync(string repoDir, string path, CancellationToken ct = default)
|
||||||
|
{
|
||||||
|
var (exitCode, _, stderr) = await RunGitAsync(repoDir, ["rm", "-f", "--", path], ct);
|
||||||
|
if (exitCode != 0)
|
||||||
|
throw new InvalidOperationException($"git rm '{path}' failed (exit {exitCode}): {stderr}");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Content of <paramref name="path"/> at a merge stage (1=base, 2=ours, 3=theirs) via
|
||||||
|
/// `git show :<stage>:<path>`. Null when that stage doesn't exist for the path —
|
||||||
|
/// the conventional way to tell a modify/delete or rename/delete conflict apart from an
|
||||||
|
/// ordinary content conflict (git never writes `<<<<<<<` markers for those,
|
||||||
|
/// it just leaves whichever side wasn't deleted in the working tree).
|
||||||
|
/// </summary>
|
||||||
|
public async Task<string?> ShowConflictStageAsync(string repoDir, int stage, string path, CancellationToken ct = default)
|
||||||
|
{
|
||||||
|
var (exitCode, stdout, _) = await RunGitAsync(repoDir, ["show", $":{stage}:{path}"], ct, trimOutput: false);
|
||||||
|
return exitCode == 0 ? stdout : null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Non-destructive mergeability probe via `git merge-tree --write-tree`. Writes only
|
/// Non-destructive mergeability probe via `git merge-tree --write-tree`. Writes only
|
||||||
/// loose objects — the working tree, index, and refs are left untouched.
|
/// loose objects — the working tree, index, and refs are left untouched.
|
||||||
|
|||||||
@@ -1,482 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260416064948_InitialCreate")]
|
|
||||||
partial class InitialCreate
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,298 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class InitialCreate : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "lists",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
name = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
created_at = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
||||||
working_dir = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
default_commit_type = table.Column<string>(type: "TEXT", nullable: false, defaultValue: "chore")
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_lists", x => x.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "tags",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
name = table.Column<string>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_tags", x => x.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "list_config",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
list_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
model = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
system_prompt = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
agent_path = table.Column<string>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_list_config", x => x.list_id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_list_config_lists_list_id",
|
|
||||||
column: x => x.list_id,
|
|
||||||
principalTable: "lists",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "tasks",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
list_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
title = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
description = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
status = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
scheduled_for = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
||||||
result = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
log_path = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
created_at = table.Column<DateTime>(type: "TEXT", nullable: false),
|
|
||||||
started_at = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
||||||
finished_at = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
||||||
commit_type = table.Column<string>(type: "TEXT", nullable: false, defaultValue: "chore"),
|
|
||||||
model = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
system_prompt = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
agent_path = table.Column<string>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_tasks", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_tasks_lists_list_id",
|
|
||||||
column: x => x.list_id,
|
|
||||||
principalTable: "lists",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "list_tags",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
list_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
tag_id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_list_tags", x => new { x.list_id, x.tag_id });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_list_tags_lists_list_id",
|
|
||||||
column: x => x.list_id,
|
|
||||||
principalTable: "lists",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_list_tags_tags_tag_id",
|
|
||||||
column: x => x.tag_id,
|
|
||||||
principalTable: "tags",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "subtasks",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
task_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
title = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
completed = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
|
|
||||||
order_num = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
created_at = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_subtasks", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_subtasks_tasks_task_id",
|
|
||||||
column: x => x.task_id,
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "task_runs",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
task_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
run_number = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
session_id = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
is_retry = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
|
|
||||||
prompt = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
result_markdown = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
structured_output = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
error_markdown = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
exit_code = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
turn_count = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
tokens_in = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
tokens_out = table.Column<int>(type: "INTEGER", nullable: true),
|
|
||||||
log_path = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
started_at = table.Column<DateTime>(type: "TEXT", nullable: true),
|
|
||||||
finished_at = table.Column<DateTime>(type: "TEXT", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_task_runs", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_task_runs_tasks_task_id",
|
|
||||||
column: x => x.task_id,
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "task_tags",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
task_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
tag_id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_task_tags", x => new { x.task_id, x.tag_id });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_task_tags_tags_tag_id",
|
|
||||||
column: x => x.tag_id,
|
|
||||||
principalTable: "tags",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_task_tags_tasks_task_id",
|
|
||||||
column: x => x.task_id,
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "worktrees",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
task_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
path = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
branch_name = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
base_commit = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
head_commit = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
diff_stat = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
state = table.Column<string>(type: "TEXT", nullable: false, defaultValue: "active"),
|
|
||||||
created_at = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_worktrees", x => x.task_id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_worktrees_tasks_task_id",
|
|
||||||
column: x => x.task_id,
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "tags",
|
|
||||||
columns: new[] { "id", "name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ 1L, "agent" },
|
|
||||||
{ 2L, "manual" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_list_tags_tag_id",
|
|
||||||
table: "list_tags",
|
|
||||||
column: "tag_id");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_subtasks_task_id",
|
|
||||||
table: "subtasks",
|
|
||||||
column: "task_id");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_tags_name",
|
|
||||||
table: "tags",
|
|
||||||
column: "name",
|
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_task_runs_task_id",
|
|
||||||
table: "task_runs",
|
|
||||||
column: "task_id");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_task_tags_tag_id",
|
|
||||||
table: "task_tags",
|
|
||||||
column: "tag_id");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_tasks_list_id",
|
|
||||||
table: "tasks",
|
|
||||||
column: "list_id");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_tasks_status",
|
|
||||||
table: "tasks",
|
|
||||||
column: "status");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "list_config");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "list_tags");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "subtasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "task_runs");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "task_tags");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "worktrees");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "tags");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "lists");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-498
@@ -1,498 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260420075929_AddTaskFlagsAndNotes")]
|
|
||||||
partial class AddTaskFlagsAndNotes
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddTaskFlagsAndNotes : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "is_my_day",
|
|
||||||
table: "tasks",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "is_starred",
|
|
||||||
table: "tasks",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "notes",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "is_my_day",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "is_starred",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "notes",
|
|
||||||
table: "tasks");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,572 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260421113614_AddAppSettings")]
|
|
||||||
partial class AddAppSettings
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 30,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "bypassPermissions",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddAppSettings : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "app_settings",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
default_claude_instructions = table.Column<string>(type: "TEXT", nullable: false, defaultValue: ""),
|
|
||||||
default_model = table.Column<string>(type: "TEXT", nullable: false, defaultValue: "sonnet"),
|
|
||||||
default_max_turns = table.Column<int>(type: "INTEGER", nullable: false, defaultValue: 30),
|
|
||||||
default_permission_mode = table.Column<string>(type: "TEXT", nullable: false, defaultValue: "bypassPermissions"),
|
|
||||||
worktree_strategy = table.Column<string>(type: "TEXT", nullable: false, defaultValue: "sibling"),
|
|
||||||
central_worktree_root = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
worktree_auto_cleanup_enabled = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
|
|
||||||
worktree_auto_cleanup_days = table.Column<int>(type: "INTEGER", nullable: false, defaultValue: 7)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_app_settings", x => x.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "app_settings",
|
|
||||||
columns: new[] { "id", "central_worktree_root", "default_claude_instructions", "default_max_turns", "default_model", "default_permission_mode", "worktree_auto_cleanup_days", "worktree_strategy" },
|
|
||||||
values: new object[] { 1, null, "", 30, "sonnet", "bypassPermissions", 7, "sibling" });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,581 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260422120000_AddTaskSortOrder")]
|
|
||||||
partial class AddTaskSortOrder
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 30,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "bypassPermissions",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddTaskSortOrder : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "sort_order",
|
|
||||||
table: "tasks",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
|
|
||||||
// Backfill existing rows with a per-list dense order (0..N-1) by creation time
|
|
||||||
// so today's UI order is preserved after the migration.
|
|
||||||
migrationBuilder.Sql("""
|
|
||||||
WITH ordered AS (
|
|
||||||
SELECT id, (row_number() OVER (PARTITION BY list_id ORDER BY created_at) - 1) AS rn
|
|
||||||
FROM tasks
|
|
||||||
)
|
|
||||||
UPDATE tasks SET sort_order = (SELECT rn FROM ordered WHERE ordered.id = tasks.id);
|
|
||||||
""");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_tasks_list_sort",
|
|
||||||
table: "tasks",
|
|
||||||
columns: new[] { "list_id", "sort_order" });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "idx_tasks_list_sort",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "sort_order",
|
|
||||||
table: "tasks");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,609 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260423154708_AddPlanningSupport")]
|
|
||||||
partial class AddPlanningSupport
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 30,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "bypassPermissions",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddPlanningSupport : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "parent_task_id",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<DateTime>(
|
|
||||||
name: "planning_finalized_at",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "planning_session_id",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "planning_session_token",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_tasks_parent_task_id",
|
|
||||||
table: "tasks",
|
|
||||||
column: "parent_task_id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_tasks_tasks_parent_task_id",
|
|
||||||
table: "tasks",
|
|
||||||
column: "parent_task_id",
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Restrict);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_tasks_tasks_parent_task_id",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "idx_tasks_parent_task_id",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "parent_task_id",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "planning_finalized_at",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "planning_session_id",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "planning_session_token",
|
|
||||||
table: "tasks");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,613 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260424212250_AddTaskCreatedBy")]
|
|
||||||
partial class AddTaskCreatedBy
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "bypassPermissions",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-632
@@ -1,632 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260427082248_AddPlanningPhaseAndBlockedBy")]
|
|
||||||
partial class AddPlanningPhaseAndBlockedBy
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddPlanningPhaseAndBlockedBy : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "blocked_by_task_id",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "planning_phase",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "none");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "default_permission_mode",
|
|
||||||
value: "auto");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_tasks_blocked_by",
|
|
||||||
table: "tasks",
|
|
||||||
column: "blocked_by_task_id");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_tasks_tasks_blocked_by_task_id",
|
|
||||||
table: "tasks",
|
|
||||||
column: "blocked_by_task_id",
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.SetNull);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_tasks_tasks_blocked_by_task_id",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "idx_tasks_blocked_by",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "blocked_by_task_id",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "planning_phase",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "default_permission_mode",
|
|
||||||
value: "bypassPermissions");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-632
@@ -1,632 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260427130058_RetireLegacyTaskStatus")]
|
|
||||||
partial class RetireLegacyTaskStatus
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class RetireLegacyTaskStatus : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
// manual / draft -> idle
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET status = 'idle' WHERE status IN ('manual', 'draft');");
|
|
||||||
|
|
||||||
// planning -> idle + planning_phase=active
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET status = 'idle', planning_phase = 'active' WHERE status = 'planning';");
|
|
||||||
|
|
||||||
// planned -> idle + planning_phase=finalized
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET status = 'idle', planning_phase = 'finalized' WHERE status = 'planned';");
|
|
||||||
|
|
||||||
// waiting -> queued + blocked_by_task_id derived from sort_order chain.
|
|
||||||
// SQLite 3.25+ supports window functions (LAG).
|
|
||||||
migrationBuilder.Sql(@"
|
|
||||||
WITH ordered AS (
|
|
||||||
SELECT id,
|
|
||||||
LAG(id) OVER (PARTITION BY parent_task_id ORDER BY sort_order, created_at) AS prev_id
|
|
||||||
FROM tasks
|
|
||||||
WHERE status = 'waiting'
|
|
||||||
)
|
|
||||||
UPDATE tasks
|
|
||||||
SET status = 'queued',
|
|
||||||
blocked_by_task_id = (SELECT prev_id FROM ordered WHERE ordered.id = tasks.id)
|
|
||||||
WHERE id IN (SELECT id FROM ordered);");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
// Best-effort and lossy: cancelled is folded back into failed,
|
|
||||||
// (idle, finalized) -> planned, (idle, active) -> planning,
|
|
||||||
// queued + blocked_by_task_id != null -> waiting.
|
|
||||||
// Manual/Draft distinction is unrecoverable — anything previously
|
|
||||||
// 'manual' or 'draft' stays 'idle' on the way back.
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET status = 'failed' WHERE status = 'cancelled';");
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET status = 'planned' WHERE status = 'idle' AND planning_phase = 'finalized';");
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET status = 'planning' WHERE status = 'idle' AND planning_phase = 'active';");
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET status = 'waiting', blocked_by_task_id = NULL WHERE status = 'queued' AND blocked_by_task_id IS NOT NULL;");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,679 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260428064951_AddPrimeSchedules")]
|
|
||||||
partial class AddPrimeSchedules
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.Property<bool>("WorkdaysOnly")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("workdays_only");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TagEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<long>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Name")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("tags", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1L,
|
|
||||||
Name = "agent"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2L,
|
|
||||||
Name = "manual"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("list_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("list_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("list_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("task_id")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.Property<long>("tag_id")
|
|
||||||
.HasColumnType("INTEGER");
|
|
||||||
|
|
||||||
b.HasKey("task_id", "tag_id");
|
|
||||||
|
|
||||||
b.HasIndex("tag_id");
|
|
||||||
|
|
||||||
b.ToTable("task_tags", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("list_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("list_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("task_tags", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TagEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("tag_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("task_id")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddPrimeSchedules : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "prime_schedules",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
||||||
start_date = table.Column<DateOnly>(type: "TEXT", nullable: false),
|
|
||||||
end_date = table.Column<DateOnly>(type: "TEXT", nullable: false),
|
|
||||||
time_of_day = table.Column<TimeSpan>(type: "TEXT", nullable: false),
|
|
||||||
workdays_only = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true),
|
|
||||||
enabled = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: true),
|
|
||||||
last_run_at = table.Column<DateTimeOffset>(type: "TEXT", nullable: true),
|
|
||||||
prompt_override = table.Column<string>(type: "TEXT", nullable: true),
|
|
||||||
created_at = table.Column<DateTimeOffset>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_prime_schedules", x => x.id);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "prime_schedules");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,587 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260519044715_RemoveTags")]
|
|
||||||
partial class RemoveTags
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.Property<bool>("WorkdaysOnly")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("workdays_only");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class RemoveTags : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "list_tags");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "task_tags");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "tags");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "tags",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
||||||
.Annotation("Sqlite:Autoincrement", true),
|
|
||||||
name = table.Column<string>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_tags", x => x.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "list_tags",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
list_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
tag_id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_list_tags", x => new { x.list_id, x.tag_id });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_list_tags_lists_list_id",
|
|
||||||
column: x => x.list_id,
|
|
||||||
principalTable: "lists",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_list_tags_tags_tag_id",
|
|
||||||
column: x => x.tag_id,
|
|
||||||
principalTable: "tags",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "task_tags",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
task_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
tag_id = table.Column<long>(type: "INTEGER", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_task_tags", x => new { x.task_id, x.tag_id });
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_task_tags_tags_tag_id",
|
|
||||||
column: x => x.tag_id,
|
|
||||||
principalTable: "tags",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_task_tags_tasks_task_id",
|
|
||||||
column: x => x.task_id,
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
|
||||||
table: "tags",
|
|
||||||
columns: new[] { "id", "name" },
|
|
||||||
values: new object[,]
|
|
||||||
{
|
|
||||||
{ 1L, "agent" },
|
|
||||||
{ 2L, "manual" }
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_list_tags_tag_id",
|
|
||||||
table: "list_tags",
|
|
||||||
column: "tag_id");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_tags_name",
|
|
||||||
table: "tags",
|
|
||||||
column: "name",
|
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_task_tags_tag_id",
|
|
||||||
table: "task_tags",
|
|
||||||
column: "tag_id");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-591
@@ -1,591 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260529142614_AddRepoImportFolders")]
|
|
||||||
partial class AddRepoImportFolders
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.Property<bool>("WorkdaysOnly")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("workdays_only");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddRepoImportFolders : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "repo_import_folders",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "repo_import_folders",
|
|
||||||
value: null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "repo_import_folders",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,600 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260601114247_AddListSortOrder")]
|
|
||||||
partial class AddListSortOrder
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.Property<bool>("WorkdaysOnly")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("workdays_only");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddListSortOrder : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "sort_order",
|
|
||||||
table: "lists",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
|
|
||||||
// Backfill existing rows with a dense order (0..N-1) by creation time
|
|
||||||
// so today's sidebar order is preserved after the migration.
|
|
||||||
migrationBuilder.Sql("""
|
|
||||||
WITH ordered AS (
|
|
||||||
SELECT id, (row_number() OVER (ORDER BY created_at) - 1) AS rn
|
|
||||||
FROM lists
|
|
||||||
)
|
|
||||||
UPDATE lists SET sort_order = (SELECT rn FROM ordered WHERE ordered.id = lists.id);
|
|
||||||
""");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_lists_sort",
|
|
||||||
table: "lists",
|
|
||||||
column: "sort_order");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropIndex(
|
|
||||||
name: "idx_lists_sort",
|
|
||||||
table: "lists");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "sort_order",
|
|
||||||
table: "lists");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-607
@@ -1,607 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260601133737_AddMaxParallelExecutions")]
|
|
||||||
partial class AddMaxParallelExecutions
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.Property<bool>("WorkdaysOnly")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("workdays_only");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddMaxParallelExecutions : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "max_parallel_executions",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 1);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "max_parallel_executions",
|
|
||||||
value: 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "max_parallel_executions",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-607
@@ -1,607 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260601140000_NormalizeListIdFormat")]
|
|
||||||
partial class NormalizeListIdFormat
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.Property<bool>("WorkdaysOnly")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("workdays_only");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class NormalizeListIdFormat : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
// SQLite: PRAGMA foreign_keys must run outside a transaction.
|
|
||||||
migrationBuilder.Sql("PRAGMA foreign_keys = OFF;", suppressTransaction: true);
|
|
||||||
|
|
||||||
// Normalize tasks.list_id: 32-char compact hex → 36-char dashed UUID
|
|
||||||
migrationBuilder.Sql("""
|
|
||||||
UPDATE tasks
|
|
||||||
SET list_id = substr(list_id,1,8)||'-'||substr(list_id,9,4)||'-'||substr(list_id,13,4)||'-'||substr(list_id,17,4)||'-'||substr(list_id,21,12)
|
|
||||||
WHERE length(list_id) = 32;
|
|
||||||
""");
|
|
||||||
|
|
||||||
// Normalize list_config.list_id (also the PK of that table)
|
|
||||||
migrationBuilder.Sql("""
|
|
||||||
UPDATE list_config
|
|
||||||
SET list_id = substr(list_id,1,8)||'-'||substr(list_id,9,4)||'-'||substr(list_id,13,4)||'-'||substr(list_id,17,4)||'-'||substr(list_id,21,12)
|
|
||||||
WHERE length(list_id) = 32;
|
|
||||||
""");
|
|
||||||
|
|
||||||
// Normalize lists.id (PK — must come last)
|
|
||||||
migrationBuilder.Sql("""
|
|
||||||
UPDATE lists
|
|
||||||
SET id = substr(id,1,8)||'-'||substr(id,9,4)||'-'||substr(id,13,4)||'-'||substr(id,17,4)||'-'||substr(id,21,12)
|
|
||||||
WHERE length(id) = 32;
|
|
||||||
""");
|
|
||||||
|
|
||||||
migrationBuilder.Sql("PRAGMA foreign_keys = ON;", suppressTransaction: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.Sql("PRAGMA foreign_keys = OFF;", suppressTransaction: true);
|
|
||||||
|
|
||||||
migrationBuilder.Sql("UPDATE tasks SET list_id = replace(list_id,'-','') WHERE length(list_id) = 36;");
|
|
||||||
migrationBuilder.Sql("UPDATE list_config SET list_id = replace(list_id,'-','') WHERE length(list_id) = 36;");
|
|
||||||
migrationBuilder.Sql("UPDATE lists SET id = replace(id,'-','') WHERE length(id) = 36;");
|
|
||||||
|
|
||||||
migrationBuilder.Sql("PRAGMA foreign_keys = ON;", suppressTransaction: true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,611 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260601150820_AddReviewFeedback")]
|
|
||||||
partial class AddReviewFeedback
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.Property<bool>("WorkdaysOnly")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("workdays_only");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddReviewFeedback : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "review_feedback",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "review_feedback",
|
|
||||||
table: "tasks");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,603 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260602060000_PrimeWeekdays")]
|
|
||||||
partial class PrimeWeekdays
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class PrimeWeekdays : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "days_of_week",
|
|
||||||
table: "prime_schedules",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 31);
|
|
||||||
|
|
||||||
migrationBuilder.Sql(
|
|
||||||
"UPDATE prime_schedules SET days_of_week = CASE WHEN workdays_only = 1 THEN 31 ELSE 127 END;");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(name: "start_date", table: "prime_schedules");
|
|
||||||
migrationBuilder.DropColumn(name: "end_date", table: "prime_schedules");
|
|
||||||
migrationBuilder.DropColumn(name: "workdays_only", table: "prime_schedules");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<DateOnly>(
|
|
||||||
name: "start_date", table: "prime_schedules",
|
|
||||||
type: "TEXT", nullable: false, defaultValue: new DateOnly(2000, 1, 1));
|
|
||||||
migrationBuilder.AddColumn<DateOnly>(
|
|
||||||
name: "end_date", table: "prime_schedules",
|
|
||||||
type: "TEXT", nullable: false, defaultValue: new DateOnly(2099, 12, 31));
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "workdays_only", table: "prime_schedules",
|
|
||||||
type: "INTEGER", nullable: false, defaultValue: true);
|
|
||||||
|
|
||||||
migrationBuilder.Sql(
|
|
||||||
"UPDATE prime_schedules SET workdays_only = CASE WHEN days_of_week = 127 THEN 0 ELSE 1 END;");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(name: "days_of_week", table: "prime_schedules");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,675 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260603072822_WeeklyReport")]
|
|
||||||
partial class WeeklyReport
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class WeeklyReport : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "report_excluded_paths",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "standup_weekday",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 3);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "daily_notes",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
note_date = table.Column<DateOnly>(type: "TEXT", nullable: false),
|
|
||||||
text = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
sort_order = table.Column<int>(type: "INTEGER", nullable: false),
|
|
||||||
created_at = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_daily_notes", x => x.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "week_reports",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
start_date = table.Column<DateOnly>(type: "TEXT", nullable: false),
|
|
||||||
end_date = table.Column<DateOnly>(type: "TEXT", nullable: false),
|
|
||||||
markdown = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
generated_at = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_week_reports", x => x.id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
columns: new[] { "report_excluded_paths", "standup_weekday" },
|
|
||||||
values: new object[] { null, 3 });
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_daily_notes_note_date",
|
|
||||||
table: "daily_notes",
|
|
||||||
column: "note_date");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_week_reports_start_date_end_date",
|
|
||||||
table: "week_reports",
|
|
||||||
columns: new[] { "start_date", "end_date" },
|
|
||||||
unique: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "daily_notes");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "week_reports");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "report_excluded_paths",
|
|
||||||
table: "app_settings");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "standup_weekday",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,682 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260603141020_DailyPrepMaxTasks")]
|
|
||||||
partial class DailyPrepMaxTasks
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class DailyPrepMaxTasks : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "daily_prep_max_tasks",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 5);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "daily_prep_max_tasks",
|
|
||||||
value: 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "daily_prep_max_tasks",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-690
@@ -1,690 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260604101453_InheritableMaxTurns")]
|
|
||||||
partial class InheritableMaxTurns
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,696 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260604125720_AddRoadblockCount")]
|
|
||||||
partial class AddRoadblockCount
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddRoadblockCount : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "roadblock_count",
|
|
||||||
table: "tasks",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "roadblock_count",
|
|
||||||
table: "tasks");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,696 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260609000000_UniqueListName")]
|
|
||||||
partial class UniqueListName
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UniqueListName : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
// Remove duplicate list rows that have no tasks — keep the oldest rowid.
|
|
||||||
// This handles the startup-race case where both App and Worker seeded
|
|
||||||
// the same default list names concurrently.
|
|
||||||
migrationBuilder.Sql("""
|
|
||||||
DELETE FROM lists
|
|
||||||
WHERE (SELECT COUNT(*) FROM tasks WHERE list_id = lists.id) = 0
|
|
||||||
AND rowid NOT IN (
|
|
||||||
SELECT MIN(l2.rowid) FROM lists l2 WHERE l2.name = lists.name
|
|
||||||
)
|
|
||||||
""");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,739 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260622150934_AddTaskAttachments")]
|
|
||||||
partial class AddTaskAttachments
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddTaskAttachments : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "task_attachments",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
task_id = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
file_name = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
byte_size = table.Column<long>(type: "INTEGER", nullable: false),
|
|
||||||
created_at = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_task_attachments", x => x.id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_task_attachments_tasks_task_id",
|
|
||||||
column: x => x.task_id,
|
|
||||||
principalTable: "tasks",
|
|
||||||
principalColumn: "id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "idx_task_attachments_task_id",
|
|
||||||
table: "task_attachments",
|
|
||||||
column: "task_id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "task_attachments");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,786 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260703072917_AddSessionSkills")]
|
|
||||||
partial class AddSessionSkills
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddSessionSkills : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "session_skills",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "session_skills",
|
|
||||||
table: "list_config",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "session_skills",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "session_skills",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
name = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
source_url = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
pinned_ref = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
subpath = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
description = table.Column<string>(type: "TEXT", nullable: false),
|
|
||||||
added_at = table.Column<DateTimeOffset>(type: "TEXT", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_session_skills", x => x.name);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "session_skills",
|
|
||||||
value: null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "session_skills");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "session_skills",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "session_skills",
|
|
||||||
table: "list_config");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "session_skills",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-802
@@ -1,802 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260727114206_AddModelPresetsAndManualFlag")]
|
|
||||||
partial class AddModelPresetsAndManualFlag
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddModelPresetsAndManualFlag : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "is_manual",
|
|
||||||
table: "tasks",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "is_manual",
|
|
||||||
table: "lists",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "model_presets",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "model_presets",
|
|
||||||
value: null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "is_manual",
|
|
||||||
table: "tasks");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "is_manual",
|
|
||||||
table: "lists");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "model_presets",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-810
@@ -1,810 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260805065217_AddHandlerCommitRange")]
|
|
||||||
partial class AddHandlerCommitRange
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-828
@@ -1,828 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260805074906_AddUsageGateAndRunModel")]
|
|
||||||
partial class AddUsageGateAndRunModel
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddUsageGateAndRunModel : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "model",
|
|
||||||
table: "task_runs",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "usage_gate_five_hour_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 80);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "usage_gate_seven_day_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 90);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
columns: new[] { "usage_gate_five_hour_pct", "usage_gate_seven_day_pct" },
|
|
||||||
values: new object[] { 80, 90 });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "model",
|
|
||||||
table: "task_runs");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "usage_gate_five_hour_pct",
|
|
||||||
table: "app_settings");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "usage_gate_seven_day_pct",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,832 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260805090016_AddVerifyCommand")]
|
|
||||||
partial class AddVerifyCommand
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("VerifyCommand")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("verify_command");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddVerifyCommand : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "verify_command",
|
|
||||||
table: "list_config",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "verify_command",
|
|
||||||
table: "list_config");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-832
@@ -1,832 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260805091910_AddWorktreeMergeCommit")]
|
|
||||||
partial class AddWorktreeMergeCommit
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("MergeCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("merge_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddWorktreeMergeCommit : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "merge_commit",
|
|
||||||
table: "worktrees",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "merge_commit",
|
|
||||||
table: "worktrees");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,843 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260805132052_AddMaxTurnsCeiling")]
|
|
||||||
partial class AddMaxTurnsCeiling
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(40)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<int>("MaxTurnsCeiling")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("max_turns_ceiling");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 40,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
MaxTurnsCeiling = 80,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("VerifyCommand")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("verify_command");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("MergeCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("merge_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddMaxTurnsCeiling : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "default_max_turns",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 40,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "INTEGER",
|
|
||||||
oldDefaultValue: 30);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "max_turns_ceiling",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 80);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
columns: new[] { "default_max_turns", "max_turns_ceiling" },
|
|
||||||
values: new object[] { 40, 80 });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "max_turns_ceiling",
|
|
||||||
table: "app_settings");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<int>(
|
|
||||||
name: "default_max_turns",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 30,
|
|
||||||
oldClrType: typeof(int),
|
|
||||||
oldType: "INTEGER",
|
|
||||||
oldDefaultValue: 40);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
column: "default_max_turns",
|
|
||||||
value: 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,844 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260805132801_AddRunCacheTokens")]
|
|
||||||
partial class AddRunCacheTokens
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("VerifyCommand")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("verify_command");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheReadTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_read_tokens");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheWriteTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_write_tokens");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("MergeCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("merge_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddRunCacheTokens : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "cache_read_tokens",
|
|
||||||
table: "task_runs",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "cache_write_tokens",
|
|
||||||
table: "task_runs",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "cache_read_tokens",
|
|
||||||
table: "task_runs");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "cache_write_tokens",
|
|
||||||
table: "task_runs");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-850
@@ -1,850 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260805133429_AddUsageThrottleThresholds")]
|
|
||||||
partial class AddUsageThrottleThresholds
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(30)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleHardPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(65)
|
|
||||||
.HasColumnName("usage_throttle_hard_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleSoftPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(50)
|
|
||||||
.HasColumnName("usage_throttle_soft_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 100,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
UsageThrottleHardPct = 65,
|
|
||||||
UsageThrottleSoftPct = 50,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("VerifyCommand")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("verify_command");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("MergeCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("merge_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddUsageThrottleThresholds : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "usage_throttle_hard_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 65);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "usage_throttle_soft_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 50);
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "app_settings",
|
|
||||||
keyColumn: "id",
|
|
||||||
keyValue: 1,
|
|
||||||
columns: new[] { "usage_throttle_hard_pct", "usage_throttle_soft_pct" },
|
|
||||||
values: new object[] { 65, 50 });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "usage_throttle_hard_pct",
|
|
||||||
table: "app_settings");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "usage_throttle_soft_pct",
|
|
||||||
table: "app_settings");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-869
@@ -1,869 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260806111454_AddInteractiveSessionId")]
|
|
||||||
partial class AddInteractiveSessionId
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(40)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<int>("MaxTurnsCeiling")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("max_turns_ceiling");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleHardPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(65)
|
|
||||||
.HasColumnName("usage_throttle_hard_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleSoftPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(50)
|
|
||||||
.HasColumnName("usage_throttle_soft_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 40,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
MaxTurnsCeiling = 80,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
UsageThrottleHardPct = 65,
|
|
||||||
UsageThrottleSoftPct = 50,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("VerifyCommand")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("verify_command");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("InteractiveSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("interactive_session_id");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheReadTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_read_tokens");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheWriteTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_write_tokens");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("MergeCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("merge_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddInteractiveSessionId : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "interactive_session_id",
|
|
||||||
table: "tasks",
|
|
||||||
type: "TEXT",
|
|
||||||
nullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "interactive_session_id",
|
|
||||||
table: "tasks");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-883
@@ -1,883 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260806141710_SplitUsageThrottlePerBucket")]
|
|
||||||
partial class SplitUsageThrottlePerBucket
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(40)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<int>("MaxTurnsCeiling")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("max_turns_ceiling");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleFiveHourHardPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(65)
|
|
||||||
.HasColumnName("usage_throttle_five_hour_hard_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleFiveHourSoftPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(50)
|
|
||||||
.HasColumnName("usage_throttle_five_hour_soft_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleSevenDayHardPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(65)
|
|
||||||
.HasColumnName("usage_throttle_seven_day_hard_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleSevenDaySoftPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(50)
|
|
||||||
.HasColumnName("usage_throttle_seven_day_soft_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 40,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
MaxTurnsCeiling = 80,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
UsageThrottleFiveHourHardPct = 65,
|
|
||||||
UsageThrottleFiveHourSoftPct = 50,
|
|
||||||
UsageThrottleSevenDayHardPct = 65,
|
|
||||||
UsageThrottleSevenDaySoftPct = 50,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("VerifyCommand")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("verify_command");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("InteractiveSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("interactive_session_id");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheReadTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_read_tokens");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheWriteTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_write_tokens");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("MergeCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("merge_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class SplitUsageThrottlePerBucket : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "usage_throttle_soft_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
newName: "usage_throttle_seven_day_soft_pct");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "usage_throttle_hard_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
newName: "usage_throttle_seven_day_hard_pct");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "usage_throttle_five_hour_hard_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 65);
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "usage_throttle_five_hour_soft_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: 50);
|
|
||||||
|
|
||||||
// The old single soft/hard pair was compared against whichever bucket was more utilized,
|
|
||||||
// so carrying it into BOTH buckets keeps an existing install behaving exactly as before
|
|
||||||
// the split — the rename above already preserved it for the 7d side.
|
|
||||||
migrationBuilder.Sql(
|
|
||||||
"""
|
|
||||||
UPDATE app_settings
|
|
||||||
SET usage_throttle_five_hour_soft_pct = usage_throttle_seven_day_soft_pct,
|
|
||||||
usage_throttle_five_hour_hard_pct = usage_throttle_seven_day_hard_pct;
|
|
||||||
""");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "usage_throttle_five_hour_hard_pct",
|
|
||||||
table: "app_settings");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "usage_throttle_five_hour_soft_pct",
|
|
||||||
table: "app_settings");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "usage_throttle_seven_day_soft_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
newName: "usage_throttle_soft_pct");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "usage_throttle_seven_day_hard_pct",
|
|
||||||
table: "app_settings",
|
|
||||||
newName: "usage_throttle_hard_pct");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,889 +0,0 @@
|
|||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using ClaudeDo.Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(ClaudeDoDbContext))]
|
|
||||||
[Migration("20260810080113_AddFindingsTracked")]
|
|
||||||
partial class AddFindingsTracked
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.AppSettingsEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("CentralWorktreeRoot")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("central_worktree_root");
|
|
||||||
|
|
||||||
b.Property<int>("DailyPrepMaxTasks")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(5)
|
|
||||||
.HasColumnName("daily_prep_max_tasks");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultClaudeInstructions")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("")
|
|
||||||
.HasColumnName("default_claude_instructions");
|
|
||||||
|
|
||||||
b.Property<int>("DefaultMaxTurns")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(40)
|
|
||||||
.HasColumnName("default_max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultModel")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sonnet")
|
|
||||||
.HasColumnName("default_model");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultPermissionMode")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("bypassPermissions")
|
|
||||||
.HasColumnName("default_permission_mode");
|
|
||||||
|
|
||||||
b.Property<int>("MaxParallelExecutions")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(1)
|
|
||||||
.HasColumnName("max_parallel_executions");
|
|
||||||
|
|
||||||
b.Property<int>("MaxTurnsCeiling")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("max_turns_ceiling");
|
|
||||||
|
|
||||||
b.Property<string>("ModelPresets")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model_presets");
|
|
||||||
|
|
||||||
b.Property<string>("RepoImportFolders")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("repo_import_folders");
|
|
||||||
|
|
||||||
b.Property<string>("ReportExcludedPaths")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("report_excluded_paths");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("StandupWeekday")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(3)
|
|
||||||
.HasColumnName("standup_weekday");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateFiveHourPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(80)
|
|
||||||
.HasColumnName("usage_gate_five_hour_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageGateSevenDayPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(90)
|
|
||||||
.HasColumnName("usage_gate_seven_day_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleFiveHourHardPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(65)
|
|
||||||
.HasColumnName("usage_throttle_five_hour_hard_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleFiveHourSoftPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(50)
|
|
||||||
.HasColumnName("usage_throttle_five_hour_soft_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleSevenDayHardPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(65)
|
|
||||||
.HasColumnName("usage_throttle_seven_day_hard_pct");
|
|
||||||
|
|
||||||
b.Property<int>("UsageThrottleSevenDaySoftPct")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(50)
|
|
||||||
.HasColumnName("usage_throttle_seven_day_soft_pct");
|
|
||||||
|
|
||||||
b.Property<int>("WorktreeAutoCleanupDays")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(7)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_days");
|
|
||||||
|
|
||||||
b.Property<bool>("WorktreeAutoCleanupEnabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("worktree_auto_cleanup_enabled");
|
|
||||||
|
|
||||||
b.Property<string>("WorktreeStrategy")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("sibling")
|
|
||||||
.HasColumnName("worktree_strategy");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("app_settings", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
DailyPrepMaxTasks = 5,
|
|
||||||
DefaultClaudeInstructions = "",
|
|
||||||
DefaultMaxTurns = 40,
|
|
||||||
DefaultModel = "sonnet",
|
|
||||||
DefaultPermissionMode = "auto",
|
|
||||||
MaxParallelExecutions = 1,
|
|
||||||
MaxTurnsCeiling = 80,
|
|
||||||
StandupWeekday = 3,
|
|
||||||
UsageGateFiveHourPct = 80,
|
|
||||||
UsageGateSevenDayPct = 90,
|
|
||||||
UsageThrottleFiveHourHardPct = 65,
|
|
||||||
UsageThrottleFiveHourSoftPct = 50,
|
|
||||||
UsageThrottleSevenDayHardPct = 65,
|
|
||||||
UsageThrottleSevenDaySoftPct = 50,
|
|
||||||
WorktreeAutoCleanupDays = 7,
|
|
||||||
WorktreeAutoCleanupEnabled = false,
|
|
||||||
WorktreeStrategy = "sibling"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.DailyNoteEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("Date")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("note_date");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("text");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("Date");
|
|
||||||
|
|
||||||
b.ToTable("daily_notes", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("VerifyCommand")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("verify_command");
|
|
||||||
|
|
||||||
b.HasKey("ListId");
|
|
||||||
|
|
||||||
b.ToTable("list_config", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DefaultCommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("default_commit_type");
|
|
||||||
|
|
||||||
b.Property<bool>("FindingsTracked")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("findings_tracked");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<string>("WorkingDir")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("working_dir");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("SortOrder")
|
|
||||||
.HasDatabaseName("idx_lists_sort");
|
|
||||||
|
|
||||||
b.ToTable("lists", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.PrimeScheduleEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<Guid>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("Days")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(31)
|
|
||||||
.HasColumnName("days_of_week");
|
|
||||||
|
|
||||||
b.Property<bool>("Enabled")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(true)
|
|
||||||
.HasColumnName("enabled");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastRunAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("last_run_at");
|
|
||||||
|
|
||||||
b.Property<string>("PromptOverride")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt_override");
|
|
||||||
|
|
||||||
b.Property<TimeSpan>("TimeOfDay")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("time_of_day");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("prime_schedules", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SessionSkillEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("name");
|
|
||||||
|
|
||||||
b.Property<DateTimeOffset>("AddedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("added_at");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<string>("PinnedRef")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("pinned_ref");
|
|
||||||
|
|
||||||
b.Property<string>("SourceUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("source_url");
|
|
||||||
|
|
||||||
b.Property<string>("Subpath")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("subpath");
|
|
||||||
|
|
||||||
b.HasKey("Name");
|
|
||||||
|
|
||||||
b.ToTable("session_skills", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<bool>("Completed")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("completed");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<int>("OrderNum")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("order_num");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_subtasks_task_id");
|
|
||||||
|
|
||||||
b.ToTable("subtasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<long>("ByteSize")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("byte_size");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("FileName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("file_name");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_attachments_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_attachments", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<string>("AgentPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("agent_path");
|
|
||||||
|
|
||||||
b.Property<string>("BlockedByTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("blocked_by_task_id");
|
|
||||||
|
|
||||||
b.Property<string>("CommitType")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("chore")
|
|
||||||
.HasColumnName("commit_type");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_by");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("description");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerBaseCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("HandlerHeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("handler_head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("InteractiveSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("interactive_session_id");
|
|
||||||
|
|
||||||
b.Property<bool>("IsManual")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_manual");
|
|
||||||
|
|
||||||
b.Property<bool>("IsMyDay")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_my_day");
|
|
||||||
|
|
||||||
b.Property<bool>("IsStarred")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_starred");
|
|
||||||
|
|
||||||
b.Property<string>("ListId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("list_id");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<int?>("MaxTurns")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("max_turns");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Notes")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("notes");
|
|
||||||
|
|
||||||
b.Property<string>("ParentTaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("parent_task_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("PlanningFinalizedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_finalized_at");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningPhase")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("none")
|
|
||||||
.HasColumnName("planning_phase");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_id");
|
|
||||||
|
|
||||||
b.Property<string>("PlanningSessionToken")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("planning_session_token");
|
|
||||||
|
|
||||||
b.Property<string>("Result")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result");
|
|
||||||
|
|
||||||
b.Property<string>("ReviewFeedback")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("review_feedback");
|
|
||||||
|
|
||||||
b.Property<int>("RoadblockCount")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("roadblock_count");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("ScheduledFor")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("scheduled_for");
|
|
||||||
|
|
||||||
b.Property<string>("SessionSkills")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_skills");
|
|
||||||
|
|
||||||
b.Property<int>("SortOrder")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(0)
|
|
||||||
.HasColumnName("sort_order");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("Status")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("status");
|
|
||||||
|
|
||||||
b.Property<string>("SystemPrompt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("system_prompt");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("title");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BlockedByTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_blocked_by");
|
|
||||||
|
|
||||||
b.HasIndex("ListId")
|
|
||||||
.HasDatabaseName("idx_tasks_list_id");
|
|
||||||
|
|
||||||
b.HasIndex("ParentTaskId")
|
|
||||||
.HasDatabaseName("idx_tasks_parent_task_id");
|
|
||||||
|
|
||||||
b.HasIndex("Status")
|
|
||||||
.HasDatabaseName("idx_tasks_status");
|
|
||||||
|
|
||||||
b.HasIndex("ListId", "SortOrder")
|
|
||||||
.HasDatabaseName("idx_tasks_list_sort");
|
|
||||||
|
|
||||||
b.ToTable("tasks", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheReadTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_read_tokens");
|
|
||||||
|
|
||||||
b.Property<int?>("CacheWriteTokens")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("cache_write_tokens");
|
|
||||||
|
|
||||||
b.Property<string>("ErrorMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("error_markdown");
|
|
||||||
|
|
||||||
b.Property<int?>("ExitCode")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("exit_code");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("FinishedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("finished_at");
|
|
||||||
|
|
||||||
b.Property<bool>("IsRetry")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasDefaultValue(false)
|
|
||||||
.HasColumnName("is_retry");
|
|
||||||
|
|
||||||
b.Property<string>("LogPath")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("log_path");
|
|
||||||
|
|
||||||
b.Property<string>("Model")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("model");
|
|
||||||
|
|
||||||
b.Property<string>("Prompt")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("prompt");
|
|
||||||
|
|
||||||
b.Property<string>("ResultMarkdown")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("result_markdown");
|
|
||||||
|
|
||||||
b.Property<int>("RunNumber")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("run_number");
|
|
||||||
|
|
||||||
b.Property<string>("SessionId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("session_id");
|
|
||||||
|
|
||||||
b.Property<DateTime?>("StartedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("started_at");
|
|
||||||
|
|
||||||
b.Property<string>("StructuredOutputJson")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("structured_output");
|
|
||||||
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensIn")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_in");
|
|
||||||
|
|
||||||
b.Property<int?>("TokensOut")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("tokens_out");
|
|
||||||
|
|
||||||
b.Property<int?>("TurnCount")
|
|
||||||
.HasColumnType("INTEGER")
|
|
||||||
.HasColumnName("turn_count");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("TaskId")
|
|
||||||
.HasDatabaseName("idx_task_runs_task_id");
|
|
||||||
|
|
||||||
b.ToTable("task_runs", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WeekReportEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("Id")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("id");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("EndDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("end_date");
|
|
||||||
|
|
||||||
b.Property<DateTime>("GeneratedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("generated_at");
|
|
||||||
|
|
||||||
b.Property<string>("Markdown")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("markdown");
|
|
||||||
|
|
||||||
b.Property<DateOnly>("StartDate")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("start_date");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("StartDate", "EndDate")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("week_reports", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("TaskId")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("task_id");
|
|
||||||
|
|
||||||
b.Property<string>("BaseCommit")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("base_commit");
|
|
||||||
|
|
||||||
b.Property<string>("BranchName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("branch_name");
|
|
||||||
|
|
||||||
b.Property<DateTime>("CreatedAt")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("created_at");
|
|
||||||
|
|
||||||
b.Property<string>("DiffStat")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("diff_stat");
|
|
||||||
|
|
||||||
b.Property<string>("HeadCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("head_commit");
|
|
||||||
|
|
||||||
b.Property<string>("MergeCommit")
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("merge_commit");
|
|
||||||
|
|
||||||
b.Property<string>("Path")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasColumnName("path");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.IsRequired()
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("TEXT")
|
|
||||||
.HasDefaultValue("active")
|
|
||||||
.HasColumnName("state");
|
|
||||||
|
|
||||||
b.HasKey("TaskId");
|
|
||||||
|
|
||||||
b.ToTable("worktrees", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListConfigEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithOne("Config")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.ListConfigEntity", "ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.SubtaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Subtasks")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskAttachmentEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BlockedByTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.SetNull);
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.ListEntity", "List")
|
|
||||||
.WithMany("Tasks")
|
|
||||||
.HasForeignKey("ListId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Parent")
|
|
||||||
.WithMany("Children")
|
|
||||||
.HasForeignKey("ParentTaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
|
||||||
|
|
||||||
b.Navigation("List");
|
|
||||||
|
|
||||||
b.Navigation("Parent");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskRunEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithMany("Runs")
|
|
||||||
.HasForeignKey("TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.WorktreeEntity", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ClaudeDo.Data.Models.TaskEntity", "Task")
|
|
||||||
.WithOne("Worktree")
|
|
||||||
.HasForeignKey("ClaudeDo.Data.Models.WorktreeEntity", "TaskId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Task");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.ListEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Config");
|
|
||||||
|
|
||||||
b.Navigation("Tasks");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ClaudeDo.Data.Models.TaskEntity", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Children");
|
|
||||||
|
|
||||||
b.Navigation("Runs");
|
|
||||||
|
|
||||||
b.Navigation("Subtasks");
|
|
||||||
|
|
||||||
b.Navigation("Worktree");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace ClaudeDo.Data.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class AddFindingsTracked : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AddColumn<bool>(
|
|
||||||
name: "findings_tracked",
|
|
||||||
table: "lists",
|
|
||||||
type: "INTEGER",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "findings_tracked",
|
|
||||||
table: "lists");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user