-
Notifications
You must be signed in to change notification settings - Fork 102
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
ignore shadow translations tables *_translations #1020
Conversation
It would be a foolproof way though as shadow tables have a multicolumn PK with a Another simpler option would be to check if a matching table without the |
58158c2
to
396e20c
Compare
Either way, then the regexp and $ignore seems not to cover it anymore here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized something. Skipping the shadow tables should be done in the ModelAllCommand
, not the TableScanner
.
I have my own customized model command where I check if the tables list returned by the TableScanner
has a matching shadow table for a table and add the Translate
behavior for it. So removing these tables from the tables list itself will break that feature.
396e20c
to
84299d9
Compare
Better? |
However, it would still bake
when running through "bake all --everything" etc |
In that case keep the |
84299d9
to
59219f4
Compare
Now it works properly 🎉 |
Resolves #1011
We probably want to document that we cannot bake any actual tables anymore that would end this way.
I have for example
https://github.com/dereuromark/cakephp-translate/blob/734d8610e6de7b81878052546890a55662e52eda/config/Migrations/20170414190437_TranslateCache.php#L11
which would then not work anymore.
Is there a way we could be more specific maybe?
Intospecting the table schema to see if it matches a shadow table schema might be overkill, no?