Giter VIP home page Giter VIP logo

Comments (7)

derekprior avatar derekprior commented on May 24, 2024

I think we had planned to re-use rails generate scenic:view searches which would be smart enough to check if searches_v1.sql already exists and adding v2 if it does.

Alternative: rails generate scenic:update searches

from scenic.

calebhearth avatar calebhearth commented on May 24, 2024

Either are fine with me.

from scenic.

derekprior avatar derekprior commented on May 24, 2024

If I have db/views/searches_v2.sql but have removed v1 - what file gets added? Do I create v1? Or do I detect that v2 is already there and increment to v3?

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.

from scenic.

derekprior avatar derekprior commented on May 24, 2024

... 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, ...).

from scenic.

calebhearth avatar calebhearth commented on May 24, 2024

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

from scenic.

calebhearth avatar calebhearth commented on May 24, 2024

I'm also happy to pad versions, but my guess is that they'll rarely get above 9, let alone 99.

from scenic.

derekprior avatar derekprior commented on May 24, 2024

Closed by #33.

from scenic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.