PageRenderTime 41ms CodeModel.GetById 18ms app.highlight 20ms RepoModel.GetById 1ms app.codeStats 0ms

/experiments/migrate_metastore.rb

https://bitbucket.org/laika/thingfish
Ruby | 18 lines | 11 code | 6 blank | 1 comment | 0 complexity | 3372d8b66aff5dfdcd4b636aecd6a3d7 MD5 | raw file
Possible License(s): BSD-3-Clause
 1#!/usr/bin/env ruby
 2
 3load './loadpath.rb'
 4require 'thingfish/config'
 5require 'thingfish/metastore'
 6
 7dd = Pathname.new( '/tmp/thingfish' )
 8sd = dd + 'spool'
 9
10ThingFish.logger.level = Logger::INFO
11
12ms = ThingFish::MetaStore.create( 'sequel', dd, sd, 
13	:sequel_connect => 'sqlite:////tmp/thingfish/metastore.db' )
14pgms = ThingFish::MetaStore.create( 'sequel', dd, sd, 
15	:sequel_connect => 'postgres://thingfish@localhost/db01' )
16
17pgms.migrate_from( ms )
18