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

[3.x] allow tagged table to be used with other tables than tag table #1723

Draft
wants to merge 5 commits into
base: 2.x
Choose a base branch
from

Conversation

YasienDwieb
Copy link
Contributor

@YasienDwieb YasienDwieb commented Jun 30, 2022

Description

For situations where you can create tags based on existing models other than the tag table, you will have to create pivot table for doing that. Taking into consideration that you can make this tagging relation with more than one model, therefore you will have to do more and more similar tables just to acheive that tagging functionality

For example: In case you using 5 models as tags, you will create 5 more tables and if this tagging will be needed for other models, hence it will produce a lot of tables

I think using the same Tagged table for doing this could be a good option.

Related Issues

@haringsrob
Copy link
Contributor

Hey @YasienDwieb,

I am not too sure about this one. This feels like something that is more for the "related" table?

So you could add a "tags" which is a browser field and unify that?

@haringsrob haringsrob changed the title allow tagged table to be used with other tables than tag table [2.x] allow tagged table to be used with other tables than tag table Jul 8, 2022
@haringsrob
Copy link
Contributor

Hey @YasienDwieb,

I had another brief look at this. It is missing a migration to make it available on existing sites.

Also, we needs to have a bit of doc's on this, but I feel since this is a new feature it should go straight into Twill 3.

@YasienDwieb YasienDwieb force-pushed the feature/allowTaggedToBeRelatingToMultipleTagTypes branch from aea8372 to b101999 Compare November 14, 2022 12:04
@YasienDwieb
Copy link
Contributor Author

Hey @haringsrob ,
Thanks you so much for your great efforts. There's a migration included which adds the needed fields to the tagged table
migrations/default/2020_02_09_000006_create_twill_default_tags_tables.php, please let me know if this is not what is needed.

Also, yeah, it would need some docs, I will work on that too.

Thank you

@haringsrob
Copy link
Contributor

Hey @YasienDwieb,

That migration works fine for new Twill installations, however, for an existing Twill installation that will not work. So the changes you made to the table should move to a new migration file instead.

@haringsrob
Copy link
Contributor

This will go into 3.x only, I will work on the update.

@ifox ifox changed the title [2.x] allow tagged table to be used with other tables than tag table [3.x] allow tagged table to be used with other tables than tag table Mar 29, 2023
@ifox ifox changed the base branch from 2.x to 3.x March 29, 2023 12:52
@ifox ifox changed the base branch from 3.x to 2.x March 29, 2023 12:53
@ifox ifox marked this pull request as draft March 29, 2023 12:54
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