Sha256: f7cab8f3ebef6184881b728cde0f6a90a4d46955374ac0ebe044142a0e068b1b

Contents?: true

Size: 456 Bytes

Versions: 7

Compression:

Stored size: 456 Bytes

Contents

module PgSlice
  class CLI
    desc "unprep TABLE", "Undo prep"
    def unprep(table)
      table = create_table(table)
      intermediate_table = table.intermediate_table
      trigger_name = table.trigger_name

      assert_table(intermediate_table)

      queries = [
        "DROP TABLE #{quote_table(intermediate_table)} CASCADE;",
        "DROP FUNCTION IF EXISTS #{quote_ident(trigger_name)}();"
      ]
      run_queries(queries)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pgslice-0.6.1 lib/pgslice/cli/unprep.rb
pgslice-0.6.0 lib/pgslice/cli/unprep.rb
pgslice-0.5.0 lib/pgslice/cli/unprep.rb
pgslice-0.4.8 lib/pgslice/cli/unprep.rb
pgslice-0.4.7 lib/pgslice/cli/unprep.rb
pgslice-0.4.6 lib/pgslice/cli/unprep.rb
pgslice-0.4.5 lib/pgslice/cli/unprep.rb