feat: allow custom version table name per model#77
Conversation
waymondo
left a comment
There was a problem hiding this comment.
works for me. i'll see if i can get an autopublish to rubygems flow working prior to merging this, so i don't need to make sure i'm on the right machine to cut new builds to the registry
| super | ||
| dump_inherited_tables(stream) | ||
| empty_line(stream) | ||
| stream.puts |
There was a problem hiding this comment.
Ahh - the Ruby 3.3 build checks were failing because Rails 8 has removed the empty_line method. Under the hood it was just doing a puts anyway, so this will give us the same effect.
|
hey sorry this slipped my mind. i will try to get the auto publishing github action workflow done this weekend |
|
sorry for the delay on this. i got the autopublish workflow setup, so feel free to bump the version here and the discard the main workflow changes and we can get this merged in |
|
Ok thanks @waymondo . I have got the PR ready again now. Note that I have added a fix in here also. The So: |
|
thanks and sorry again i missed the GH notification on your update. work notifications have been extra noisy the last couple weeks |
Here is a proposed small change to allow specifying a custom version table name from the source model.
The default is
<source_table>_versions, but we have a particular situation where this generated name is not available so I'd like to be able to specify a custom versions table name.It's done like so:
Putting this directly into
hoardable_configis a bit tricky because the currentCONFIG_KEYSare all presumed to be booleans so this change would break that pattern. But considering this is a fairly minor change and likely pretty obscure, I am not sure changing the behaviour ofhoardable_configis warranted?Open to ideas, though!
Note that I have added a fix in this PR also.
The
contextual_event_uuidwas potentially getting leaked into the surrounding scope because it was being copied onto thehoardable_event_uuidaswell.So:
We now ensure to only return the
contextual_event_uuidif we have it. It will be blown away when thewithblock is done.