Sha256: b6bb2782241985c728fc319b415b21a0bf8f3db903fc451d80ac77482d8b396b

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

Sequel.migration do
  up do
    lex = from(:extensions).insert(namespace: 'Legion::Extensions::Lex', name: 'lex', exchange: 'lex', uri: 'lex')
    [
      { extension_id: lex, namespace: 'Legion::Extensions::Lex::Runners::Register', name: 'register', queue: 'register', uri: 'register' },
      { extension_id: lex, namespace: 'Legion::Extensions::Lex::Runners::Function', name: 'function', queue: 'function', uri: 'function' },
      { extension_id: lex, namespace: 'Legion::Extensions::Lex::Runners::Runner', name: 'runner', queue: 'runner', uri: 'runner' },
      { extension_id: lex, namespace: 'Legion::Extensions::Lex::Runners::Extension', name: 'extension', queue: 'extension', uri: 'extension' }
    ].each do |row|
      from(:runners).insert row
    end

    lex = from(:extensions).insert(namespace: 'Legion::Extensions::Node', name: 'node', exchange: 'node', uri: 'node')
    [
      { extension_id: lex, namespace: 'Legion::Extensions::Node::Runners::Crypt', name: 'crypt', queue: 'crypt', uri: 'crypt' }
    ].each do |row|
      from(:runners).insert row
    end
  end

  down do
    from(:extensions).where(namespace: 'Legion::Extensions::Lex').delete
    from(:extensions).where(namespace: 'Legion::Extensions::Node').delete
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legion-data-1.2.0 lib/legion/data/migrations/007_add_default_extensions.rb