Permalink
Browse files

Added --no-schema flag for difficult oracle migrations

  • Loading branch information...
Jordan Curzon authored and ricardochimal committed Feb 3, 2011
1 parent d29c43f commit 2e0b985f184f956e49e89dde2b8dbbe1ffa4f921
Showing with 9 additions and 4 deletions.
  1. +1 −0 lib/taps/cli.rb
  2. +8 −4 lib/taps/operation.rb
View
@@ -128,6 +128,7 @@ def clientoptparse(cmd)
o.define_head "Push a database to a taps server"
end
o.on( '--no-schema', "Don't transfer the schema, just data") {|v| opts[:no_schema] = true }
o.on("-i", "--indexes-first", "Transfer indexes first before data") { |v| opts[:indexes_first] = true }
o.on("-r", "--resume=file", "Resume a Taps Session from a stored file") { |v| opts[:resume_filename] = v }
o.on("-c", "--chunksize=N", "Initial Chunksize") { |v| opts[:default_chunksize] = (v.to_i < 10 ? 10 : v.to_i) }
View
@@ -29,6 +29,10 @@ def file_prefix
"op"
end
def skip_schema?
!!opts[:no_schema]
end
def indexes_first?
!!opts[:indexes_first]
end
@@ -241,7 +245,7 @@ def to_hash
def run
catch_errors do
unless resuming?
pull_schema unless opts[:skip_schema]
pull_schema unless skip_schema?
pull_indexes if indexes_first?
end
setup_signal_trap
@@ -400,13 +404,13 @@ def to_hash
def run
catch_errors do
unless resuming?
push_schema unless opts[:skip_schema]
push_indexes if indexes_first?
push_schema unless skip_schema?
push_indexes if indexes_first? && !skip_schema?
end
setup_signal_trap
push_partial_data if resuming?
push_data
push_indexes unless indexes_first?
push_indexes unless indexes_first? || skip_schema?
push_reset_sequences
end
end

0 comments on commit 2e0b985

Please sign in to comment.