Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds a new farm CLI module to create and prepare wiki databases, wires it into CLI dispatch, refactors DB drop/reset routines to accept explicit database names, and updates README with installation instructions for the Rust rewrite. (≤50 words) Changes
Sequence DiagramsequenceDiagram
participant User
participant CLI as CLI Handler
participant Farm as Farm Module
participant DB as Database
participant Reset as Reset Module
User->>CLI: run `mwutil farm install --db <name>`
CLI->>Farm: execute(config, FarmArgs)
Farm->>Farm: validate db_name ends with "wiki"
alt valid
Farm->>DB: CREATE DATABASE IF NOT EXISTS `<db>`
DB-->>Farm: success/failure
Farm->>DB: GRANT ALL PRIVILEGES ON `<db>`.* TO `<user>`
DB-->>Farm: success/failure
Farm-->>CLI: print "Created database."
Farm->>Reset: reset_database(config, <db>, true)
Reset->>DB: run update script (--wiki, --quick)
alt new == false
Reset->>DB: run recreate step
DB-->>Reset: recreate result
end
Reset-->>Farm: reset result
Farm-->>CLI: exit success
else invalid
Farm-->>CLI: exit error "db_name must end with 'wiki'"
end
CLI-->>User: show result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
remove unused fix again fix refactor and fix
Summary by CodeRabbit
New Features
farm installcommand to create and configure wiki databases with automatic privilege setup.Documentation