Giter Club home page Giter Club logo

pragma-migration's People

Contributors

aldesantis avatar

Watchers

 avatar

pragma-migration's Issues

Transformation abstractions

Todos

  • Abstraction to deal with decorators/contracts directly
    • Class-based pattern matching (in Base#apply_to)
    • Base#add_property, Base#transform_property etc.
  • Figure out how to apply migrations on collections (e.g. Base.migrate_each?)

Notes

Not sure this is doable/we want to do it.

Operation hooks

Todos

  • Pass Rack::Request object from Rails to operations (in pragma-rails)
  • Hook into Pragma::Operation to implement migration_rolled?

Notes

It's not clear right now how we can retrieve the migration repository from the operation, since we don't have access to the middleware's configuration. Perhaps we can inspect the middleware chain from the Rack environment?

Benchmark variety

We should try to improve the benchmark with different types of migrations, at least 3-4, to see the impact of different transformations on performance.

Rails integration

Todos

  • Write integration tests with a real Pragma/Rails app
  • Include in pragma-rails-starter with sensible defaults (repository and configuration)

Store migrations in resources

We should store migrations under the namespace of the respective resource, e.g. API::V1::Article::Migration::RemoveIdSuffixFromAuthor.

Fail from version proc

Example

module YourApp
  class Application < Rails::Application
    config.middleware.use Pragma::Migration::Middleware, 
      repository: API::V1::MigrationRepository,
      user_version_proc: (lambda do |request|
        request.get_header('X-Api-Version') || 
          fail(Pragma::Migration::InvalidVersionError, '...')
      end)
  end
end

Notes

This could be handled by the Pragma::Operation hook, which then responds accordingly.

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.