Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

creation and update times of elements #1168

Open
7 tasks
markus2330 opened this issue Jan 20, 2024 · 4 comments · May be fixed by #1175
Open
7 tasks

creation and update times of elements #1168

markus2330 opened this issue Jan 20, 2024 · 4 comments · May be fixed by #1175
Assignees
Labels
backend changes in Rust code enhancement New feature or request

Comments

@markus2330
Copy link
Contributor

markus2330 commented Jan 20, 2024

Tasks

To have some auditability, we want:

  • creation time (granularity in seconds)
  • creation id (person who created)
  • modification time (granularity in seconds)
  • modification id (person who modified)

Use cases

All layers that have elements, currently:

Furthermore, also following should

  • map(s) should have above attributes, to be seen in the map list

Not needed:

  • seeds are currently private without collaboration
@markus2330 markus2330 added enhancement New feature or request backend changes in Rust code labels Jan 20, 2024
@horenso horenso moved this to Current Sprint in PermaplanT Jan 22, 2024
@horenso
Copy link
Contributor

horenso commented Jan 24, 2024

A few comments from @chr-schr and me:

  1. We suggest calling it created_at, create_by, modified_at and modified_by since plants.created_at (not plantings) already exists.
    create_by is more descriptive than creation_id in our opinion.

  2. We suggest that created_at and modified_at are non-null and are that these have the same value upon creation (like in Windows).

  3. For initial values in the migration we propose:

    • map.owner_id for create_by and modified_by
    • map.creation_date for created_at and modified_at
  4. Does it make sense to have maps.created_by when there is already an owner_id, meaning would we ever distinguish between creator and owner?
    For maps we suggest:

    • renaming creation_date to created_at and changing the type to timestamp
    • leaving owner_id as it is
    • creating the columns modified_by, modified_at

@markus2330
Copy link
Contributor Author

1-3: fantastic suggestions, I agree to all of them.

  1. no, creator=owner, we need to introduce one term in the glossary and should consistently use that term. Changing to which term is less work?

@chr-schr chr-schr moved this from Current Sprint to In Progress in PermaplanT Jan 28, 2024
@horenso
Copy link
Contributor

horenso commented Jan 29, 2024

@markus2330 When should map.modified_by and modified_at change? Whenever any api on the map changed something, right? So when we CUD new planting the map should update map.modified_by and modified_at, shade layer, drawing layer etc.

@markus2330
Copy link
Contributor Author

Exactly, so some guard needs to be added in every modifying operation. Especially the map date modified date gets modified virtually everywhere a write operation happens.

@horenso horenso linked a pull request Jan 30, 2024 that will close this issue
27 tasks
@markus2330 markus2330 assigned horenso and unassigned horenso and chr-schr Feb 5, 2024
@horenso horenso moved this from In Progress to In Review in PermaplanT Apr 1, 2024
@horenso horenso moved this from In Review to In Progress in PermaplanT Apr 17, 2024
@horenso horenso moved this from In Progress to In Review in PermaplanT Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend changes in Rust code enhancement New feature or request
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

3 participants