Sha256: 2ae7c190a3bc08e49de0f2a5d6d1dd86e77fd02fd5043188950b9cda6822aa40

Contents?: true

Size: 808 Bytes

Versions: 26

Compression:

Stored size: 808 Bytes

Contents

module Neo4j

  module Migrations
    # This node stores the migrations for Neo4j.migrations
    # Uses the Neo4j.ref_node for keeping the current version of the db.
    # When the database starts it will check if it needs to run a migration.
    class RefNodeWrapper
      extend ClassMethods

      class << self
        def migrate!(version=nil)
          _migrate!(self, Neo4j.ref_node, version)
        end

        def db_version
          Neo4j.ref_node[:_db_version] || 0
        end

        # Remote all migration and set migrate_to = nil and set the current version to nil
        def reset_migrations!
          @migrations = nil
          @migrate_to = nil
          Neo4j::Transaction.run do
            Neo4j.ref_node[:_db_version] = nil
          end
        end
      end
    end

  end

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
neo4j-2.0.0.alpha.5-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-2.0.0.alpha.4-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-2.0.0.alpha.3-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.3.1-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.3.0-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.2.6-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.2.5-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.2.4-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.2.3-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.2.2-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.2.1-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.2.0-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.4-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.3-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.2-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.1-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.0-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.0.beta.3-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.0.beta.2-java lib/neo4j/migrations/ref_node_wrapper.rb
neo4j-1.1.0.beta.1-java lib/neo4j/migrations/ref_node_wrapper.rb