Skip to content

junction table sql for weather #330

Description

@Carpenteri1
Image

What

If your an agent, Read the AGENTS.md file in the project.
Look at the image, its shows an UML scheme with a junction table relationship.

Create a junction table between card and weatherdata table.
This is to store the weather data over time.
We can look in the database for a specific location, is it stored on another card?
Is it in the database?
If its not in the database we can look at our provider api.
If its in the debase, with the junction table,
we can connect one or more card to the same location.

Also WeatherTable needs to have CardId removed.
The only connection to the cards and weather table should be the connection table.
All other columns should be there still. Address needs to be unique and if location and contidiion still is there, remove them.
The properties from the models and dtos needs to be removed also along with cardid.

Card id and weather id should be in the WeatherDataConnectionDtoModel.

Why

In order to delete a card we need to delete weather data.
Currently when deleting a card we gonna need to delete weather data.
Use the junction table to connect a card to weatherdata.

Definition of done

  • Create junction table
  • Keep the data in weatherData table and the Card Table, the UML only shows relationships with junction table.
  • Weather and cards should be able to connect via the junction table
  • When we delete a card connection should be gone, weatherdata should not be deleted.
  • If weather data already is in the database based on location, we just connect a card via the junction table
  • location needs to be unique
  • Test so all client to endpoints down to repository and back to client works as intended for row, card, icon, settings, provider key, weather and widget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions