Skip to content
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

Crops Tab Functionality #125

Open
7 tasks
dallascrichmond opened this issue Jan 10, 2025 · 2 comments
Open
7 tasks

Crops Tab Functionality #125

dallascrichmond opened this issue Jan 10, 2025 · 2 comments
Assignees
Labels
Ready User Story New feature or request

Comments

@dallascrichmond
Copy link
Collaborator

dallascrichmond commented Jan 10, 2025

As a farmer I want to add my crops to individual fields So That I can see the different nutrients needed

Additional Context

  • Part of Fields and Soil Section
  • Using Temp Data for now
  • Final Styling and Validation will be in a separate ticket

Acceptance Criteria

  • Crops tab appears when next is pressed on Farm Information page
  • Add Crops, Prev Button, Next Button, and a list of added fields are present
  • Add Crops Button brings up Modal with varying fields to fill in depending on which crop type is chosen (Refer to old NMP for Fields)
  • Calculate Button calculates the Crop Requirement and Nutrient removal
  • Save Button saves all form data to local storage and displays crop info next to associated field
  • Prev Button Takes the user back to Farm Information Page
  • Next Button changes section to Manure and Compost section (Empty)
@dallascrichmond dallascrichmond added User Story New feature or request Ready labels Jan 10, 2025
@dallascrichmond dallascrichmond self-assigned this Jan 10, 2025
@raarielgrace
Copy link
Contributor

So... we've run into issues again. None of the database tables have a proper primary key (a column that is non-null and unique). Because the database tables store every version of the table together, only the combination of the id and version_id are unique. In SQL speak, this would be a composite primary key. The Django admin portal requires the presence of a primary key. The newest alpha of Django includes support for composite primary keys, but they still aren't supported in the admin portal. These are the options:

  1. Add another column to each table that contains a unique id. We'll then have 3 different id columns.
  2. Trim down each table to its most recent version, version 14. Track the previous versions and changes in a different manner. This will make the id column a proper primary key. It might, however, make previous versions inaccessible or more complex to access for the SO.
  3. Keep using Django, but build our own admin portal instead of using Django's admin portal.
  4. Move away from Django entirely, trying to find something else that will generate an admin view for us without requiring primary keys.

@jakemorr
Copy link

@raarielgrace I'm in favor of either option 1 or 2, so long as we keep that information available to the service owner in some way i think option 2 makes the most sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready User Story New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants