Feature/db sprint1 - #1
Merged
Merged
Conversation
ConfirmEmailUseCase moves a client to ACTIVE and no use case writes to account_status_changes yet, so the trigger rejected email confirmation and broke HU-001. It now applies only to organizations, where no code updates the status. Seed also covers Sunday, which left query 6 empty every Friday.
psql -f prefixes every error with file:line, so the anchored pattern never matched and the check passed with zero rejections. grep -c with no match also aborts the step under bash -e. The row counter accepted (0 rows) as a result; it now requires at least one row.
Explains what each file is, in which order it runs, and how to bring up the schema with the db service of the existing docker-compose. Commands verified against that compose.
The single-canvas version was not readable: all 27 relationships had an empty label, none had explicit waypoints, the old and new entities used different crow's foot conventions, and the entities added later sat far below the rest so their edges crossed the whole canvas and the user story blocks. Rebuilt as four pages (identity and organization, catalogue and resources, bookings, user stories). Every relationship now carries a verb phrase read from source to target, both ends use the same notation, and routing uses explicit waypoints: the corridor between columns for adjacent entities and a dedicated lane below the diagram for the few edges that span more than one column. Checked with a script over the XML: 27 relationships, 0 without a label, 0 segments crossing a box, one cardinality convention. Rendered to PNG and reviewed page by page.
The previous commit split the diagram into themed pages only, which dropped the single-sheet view the team had: opening the file showed ten entities and none of the user story blocks, because the rest lived in other tabs. The first page is now Modelo completo, with the nineteen entities, the six design notes, the five user stories and the legend on one sheet, as before. The themed pages stay after it as per-domain views. Table widths are normalised so column edges line up; that is what lets every edge leave into a clear corridor. Checked: 54 relationships across the five pages, 0 without a label, 0 segments crossing a box.
A cross-check of the diagram against the schema loaded in PostgreSQL found four gaps: - eleven entities were missing columns that exist in schema.sql (created_at/updated_at in ten of them, Currency.active and ServiceResourceRequirement.organization_id) - the foreign key from bookings to service_locations was not drawn - Organization -> Booking was drawn as a direct foreign key, which it is not: bookings.organization_id is enforced through the composite keys. The label now says so - User was not marked as external, so auth.users read as one more table Fixing it also surfaced two older defects: Organization had nit and contact_email drawn on top of each other, and Service had the wrong height. Row geometry is now computed instead of hand-placed, and so is the vertical position of every entity, so boxes cannot end up touching when one of them grows. Checked: 56 relationships across five pages, 0 without a label, 0 segments crossing a box, 0 overlapping boxes, every column matching the real schema.
… stories The diagram drew Organization -> Booking.organization_id, but no such foreign key exists: the column is a denormalised copy already guarded by the composite keys against services, locations and organization_policies. It now matches ServiceResourceRequirement, which has the same shape and carries no line, so the diagram maps one to one onto the 26 declared foreign keys. The five user story columns declared 560 px of width on a 600 px pitch while the text renders at roughly 610, so each column ran into the next one. They are now 700 wide on a 760 pitch, and the legend on that sheet moves from a thousand pixels below the content to its right-hand side. The fifth page was missing from the export; it ships as der-4-historias-de-usuario.png and the docs that list the pages now say five.
|
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.



No description provided.