-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Generate view definition and migration for updates #23
Comments
I think we had planned to re-use Alternative: |
Either are fine with me. |
If I have Should the versioning use the timestamp like migrations to avoid even having to think of this? The obvious downside there is that it's a lot more work to figure out what to put in revert_to unless we default it. |
... and even if we default it, it's still a real pain to figure out what to override it with. The files would still sort sanely (which they actually won't with our current naming scheme (v1, v10, v11, v2, ...). |
Seems fairly simple to me: %w(foo_v2.sql foo_v10.sql)
.map { |name| /v(?<version>\d+)\.sql$/.match(name)["version"].to_i }
.max.next |
I'm also happy to pad versions, but my guess is that they'll rarely get above 9, let alone 99. |
Closed by #33. |
rails generate view_update searches
<= or the likeThe text was updated successfully, but these errors were encountered: