Feature/restructure farm#648
Merged
vincent-olivert-riera merged 4 commits intoline:masterfrom Sep 19, 2025
Merged
Conversation
We added a migration script to link projects to a newly cloned farm if they are using a shared farm with other projects. Due to the presence of these cloned farms, we also removed the constraint that required farm names and farm sources to be unique.
6bdfbcd to
18ae98e
Compare
We have added some changes to both UI and View classes to make Farm become child object of Project. Each Project will have its own Farm. - Not support linking Project to an existed local Farm. - Always delete Farm after unlinking it from its Project. - Always create new Farm in the database when linking a remote Farm.
Since the Farm has become a child object of the Project, we have removed all permissions and the permission management feature related to the Farm model. Now, a user's permissions on a Farm will be inherited from the user's permissions on the parent Project of that Farm.
Since the Farm has become a child object of the Project and the permission management for the Farm has inherited from its parent Project, the field 'owner' of the Farm model become unnecessary. We have removed this field.
18ae98e to
9504934
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Convert the relationship between the Project and the Farm from N-1 to 1-1 by reusing the farm_id field in the table promgen_project and cloning data in the table promgen_farm.
This PR includes the following changes:
UI changes:
Project's Hosts : Buttons and Confirn message (only changes for Local Farm)






AS-IS:
TO-BE:
Farm Register: Remove owner field


AS-IS:
TO-BE:
Farm Detail: Remove panels and change the breadcrumb


AS-IS:
TO-BE:
Host Detail: Change UI and the Silence button


AS-IS:
TO-BE:
Farm List: Remove ul tag due to only one project per farm


AS-IS:
TO-BE:
Host List: Remove ul tag due to only one project per farm


AS-IS:
TO-BE:
Search: Change UI and the Silence button


AS-IS:
TO-BE: