Skip to content

add foreign key check#10

Merged
HansMarcus01 merged 4 commits intomainfrom
feature-requerimiento10
May 23, 2025
Merged

add foreign key check#10
HansMarcus01 merged 4 commits intomainfrom
feature-requerimiento10

Conversation

@javierariashe
Copy link
Copy Markdown
Member

@javierariashe javierariashe commented Apr 27, 2025

Se añadió la funcionalidad para que solo sea posible formar una FK desde un campo válido. Este tiene que ser una llave primaria o ser único y no nulo.

Cuando se puede usar el campo como llave foránea funciona normalmente:

image

image

Cuando no es posible utilizar el campo como llave foránea se muestra un mensaje:

image

Copy link
Copy Markdown

@pabloem pabloem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muchas gracias! Podrias mostrar screenshots / video de como se comporta tu cambio?

Comment thread src/components/EditorCanvas/Canvas.jsx
Comment thread src/i18n/locales/en.js Outdated
relationship_deleted: "Relationship deleted",
type_deleted: "Type deleted",
cannot_connect: "Cannot connect, the columns have different types",
cannot_fk: "Cannot create foreign key from this field",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podrias agregar una explicacion al mensaje? p.e. - "Only fields that are UNIQUE and ... bla bla bla"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya agregué la explicación al mensaje

Comment thread src/components/EditorCanvas/Table.jsx
update message shown when a field cant be selected as a foreign key.
@javierariashe javierariashe changed the title Requerimiento 10 add foreign key check May 16, 2025
@pabloem
Copy link
Copy Markdown

pabloem commented May 22, 2025

LGTM

@HansMarcus01 HansMarcus01 merged commit 88f27d3 into main May 23, 2025
3 checks passed
@javierariashe javierariashe deleted the feature-requerimiento10 branch June 2, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants