-
Notifications
You must be signed in to change notification settings - Fork 44
RHINENG-25147: refactor workspaces #2176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Dugowitch
wants to merge
34
commits into
RedHatInsights:master
Choose a base branch
from
Dugowitch:workspaces
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
2ee4d01
RHINENG-25147: refactor workspaces in DB
Dugowitch 7632358
RHINENG-25147: update create_schema after the refactor
Dugowitch efc195a
RHINENG-25147: update test_data after migration
Dugowitch ac28fbb
RHINENG-25147: add SystemWorkspaces
Dugowitch 10b75d8
RHINENG-25147: update columns in export tests
Dugowitch 5a06fea
RHINENG-25147: set invenotry workspaces in context
Dugowitch e41cfdf
RHINENG-25147: replace groups with workspaces: PostSystemsAdvisories
Dugowitch e9a3c76
RHINENG-25147: replace groups with workspaces: database.Systems()
Dugowitch ed5f74d
RHINENG-25146: replace groups with workspaces: PackagesExportHandler,…
Dugowitch 4f4771a
RHINENG-25147: replace groups with workspaces: SystemDetailHandler, S…
Dugowitch ea0178f
RHINENG-25147: replace groups with workspaces: SystemsListHandler, Sy…
Dugowitch 00cca6b
RHINENG-25147: replace groups with workspaces: SystemTagListHandler
Dugowitch 538139f
RHINENG-25147: replace groups with workspaces: TemplateSystemsListHan…
Dugowitch a8f97e8
RHINENG-25147: replace groups with workspaces: TemplatesListHandler
Dugowitch ece5729
RHINENG-25147: replace groups with workspaces: TemplateSystemsUpdateH…
Dugowitch 62323b0
RHINENG-25147: replace groups with workspaces: AdvisoriesListHandler,…
Dugowitch 3e69fed
RHINENG-25147: replace groups with workspaces: AdvisorySystemsListHan…
Dugowitch 27c3b03
RHINENG-25147: replace groups with workspaces: PostAdvisoriesSystems
Dugowitch 5d32fcd
RHINENG-25147: replace groups with workspaces: SystemAdvisoriesHandle…
Dugowitch 2017a32
RHINENG-25147: remove old database.SystemAdvisories()
Dugowitch 3b148f6
RHINENG-25147: replace groups with workspaces: PackageSystemsListHand…
Dugowitch 89acf35
RHINENG-25147: replace groups with workspaces: PackageVersionsListHan…
Dugowitch d980a15
RHINENG-25147: replace groups with workspaces: SystemPackagesHandler,…
Dugowitch ac6ea05
RHINENG-25147: remove old database.SystemPackages()
Dugowitch e6c1a77
RHINENG-25147: remove old database.Systems()
Dugowitch 9efc7ca
RHINENG-25147: remove old database.ApplyInventoryWorkspaceFilter()
Dugowitch 97577f9
RHINENG-25147: refactor filtering by group_name
Dugowitch 3b8ad95
RHINENG-25147: refactor workspaces in system_inventory model
Dugowitch 517a066
RHINENG-25147: drop workspaces column
Dugowitch 0154432
RHINENG-25147: remove SystemGroups
Dugowitch 86d7306
RHINENG-25147: update columns in export tests
Dugowitch 9e80e2d
RHINENG-25147: remove inventory groups from context
Dugowitch f987ecd
RHINENG-25147: remove workspaces from model
Dugowitch d19ec59
RHINENG-25147: update openapi
Dugowitch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ALTER TABLE system_inventory | ||
| ADD COLUMN workspace_id TEXT CHECK (NOT empty(workspace_id)), | ||
| ADD COLUMN workspace_name TEXT CHECK (NOT empty(workspace_name)); | ||
|
|
||
| UPDATE system_inventory | ||
| SET workspace_id = workspaces->0->>'id', | ||
| workspace_name = workspaces->0->>'name'; | ||
|
|
||
| CREATE INDEX IF NOT EXISTS system_inventory_workspace_id_index ON system_inventory (workspace_id); | ||
| CREATE INDEX IF NOT EXISTS system_inventory_workspace_name_index ON system_inventory (workspace_name); | ||
|
|
||
| ALTER TABLE system_inventory | ||
| DROP COLUMN workspaces; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workspace_id is uuid so we should use UUID type here - 2 reasons (at least):
empty()check,