Skip to content

feat: add isLMSAvailable field to device model#905

Draft
sinchubhat wants to merge 1 commit intomainfrom
issue1246-rpc-go
Draft

feat: add isLMSAvailable field to device model#905
sinchubhat wants to merge 1 commit intomainfrom
issue1246-rpc-go

Conversation

@sinchubhat
Copy link
Copy Markdown
Contributor

  • Add database migration to store islmsavailable boolean on devices table
  • Update device entity, DTO, and CRUD queries to handle the new field

Resolves #1246 of RPC-Go

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.66%. Comparing base (92b6397) to head (b412772).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #905      +/-   ##
==========================================
+ Coverage   40.62%   40.66%   +0.03%     
==========================================
  Files         116      116              
  Lines       10889    10895       +6     
==========================================
+ Hits         4424     4430       +6     
  Misses       6072     6072              
  Partials      393      393              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

* Add database migration to store islmsavailable boolean on devices table
* Update device entity, DTO, and CRUD queries to handle the new field

Resolves #1246 of RPC-Go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an isLMSAvailable boolean attribute to the Device model and persists it in the database, wiring it through DTO/entity conversions and SQL CRUD.

Changes:

  • Add DB migration to create/drop devices.islmsavailable with a default of FALSE.
  • Extend device entity + v1 DTO + usecase transforms to include IsLMSAvailable.
  • Update SQL repo Select/Scan/Insert/Update paths (and test DB schemas) to handle the new column.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/usecase/sqldb/device.go Adds islmsavailable to device Select/Scan and Insert/Update statements.
internal/usecase/sqldb/device_test.go Updates SQLite test schemas to include the new column.
internal/usecase/devices/usecase.go Maps IsLMSAvailable between DTO and entity in both directions.
internal/entity/dto/v1/device.go Adds isLMSAvailable to the v1 Device JSON model.
internal/entity/device.go Adds IsLMSAvailable to the core Device entity.
internal/app/migrations/20260424000000_add_lms_available.up.sql Adds islmsavailable column to devices.
internal/app/migrations/20260424000000_add_lms_available.down.sql Drops islmsavailable column from devices.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/usecase/sqldb/device_test.go
Comment thread internal/usecase/devices/usecase.go
Comment thread internal/usecase/sqldb/device.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect LMS during orchestration and report it to Console

2 participants