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

Adding map note tags - part 1 - added migration script and model files #5323

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nenad-vujicic
Copy link
Contributor

Description

Added migration for creating note_tags DB table, created model file NoteTag.rb, updated associations with Note class and added note_tag factory and unit tests NoteTagTests for testing basic functionalities (key/value lengths validity, key/value lengths invalidity, orphaned tags invalidity and note-tags uniqueness).

This PR is first step of adding support for map note tags described in #5294 and which fully implementation can be found here (decomposed to smaller because of simpler review).

How has this been tested?

Tested by running linters from lint.yml workflow, unit tests and by manually inserting note-tags manipulations and as part of complete implementation locally.

db/structure.sql Outdated Show resolved Hide resolved
Added NoteTag model class, note_tags DB table, associations between Note
and NoteTag and private / foreign keys.
Added registering new factory bot for note_tag and added new unit tests
to NoteTagTest for checking if key length is valid, value length is
valid, key length is invalid, value length is invalid, orphaned tag is
invalid and note_tags are unique.
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.

2 participants