tapsoob 0.5.12-java → 0.5.13-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ef797cf07d277030f96dcd1b67a6709ea9cba6cb360c5740a10c702b9b06943
4
- data.tar.gz: 2a85904b22d37629e9956a4bf77265f5b17407e297fc192b16dee3b31739016f
3
+ metadata.gz: f15f95d497c0a2645e9dd902ecfb2198664762fcd0701c9f01d409921a2b0653
4
+ data.tar.gz: 1ab90f1ecce4dd79ffc900302b73c8ed16d6abcd8c04176fd51eb1e9ae6cee32
5
5
  SHA512:
6
- metadata.gz: da4484d162167a62adf168a61110331b518b73fbd9a6a162012afc74e4e64b996491f3a87f4605590752d51392a971adbca0216fbd5490253a917e17da7d3d39
7
- data.tar.gz: 020c21fbc83cab7f8dbba8dbc4c3cd2d14da3f71f0090ff9d7b2fd60f641d0e46ecc4c7597656ccf56eadca2fa65cf045b141e976ccaac0d013a236c447c470b
6
+ metadata.gz: 7a67d2f2b8665393d5c3541bcb3912f732ae2a3e036a9dd60e3551bb566e5698a19a13c57afc0b497389959a48a070785738fe0e0218713c4c4c728638223ff8
7
+ data.tar.gz: 7b364e06053d1b961fd5d5a4fbb393e896aba41903b5bc4c7373e077878d04ece4f27ebbb1587f5d2a4a40ccbc4f97f222beb675e7af88f94fd0f55885b5b6b6
@@ -14,8 +14,14 @@ module Tapsoob
14
14
  end
15
15
 
16
16
  desc "dump DATABASE_URL", "Dump a database using a database URL"
17
+ option :indexes, type: :boolean, default: false
18
+ option :"same-db", type: :boolean, default: false
17
19
  def dump(database_url)
18
- puts Tapsoob::Schema.dump(database_url)
20
+ opts = {}
21
+ opts[:indexes] = options[:"indexes"]
22
+ opts[:same_db] = options[:"same-db"]
23
+
24
+ puts Tapsoob::Schema.dump(database_url, opts)
19
25
  end
20
26
 
21
27
  desc "dump_table DATABASE_URL TABLE", "Dump a table from a database using a database URL"
@@ -9,14 +9,14 @@ module Tapsoob
9
9
  module Schema
10
10
  extend self
11
11
 
12
- def dump(database_url)
12
+ def dump(database_url, options = {})
13
13
  db = Sequel.connect(database_url)
14
14
  db.extension :schema_dumper
15
15
  template = ERB.new <<-END_MIG
16
16
  Class.new(Sequel::Migration) do
17
17
  def up
18
18
  <% db.send(:sort_dumped_tables, db.tables, {}).each do |table| %>
19
- <%= db.dump_table_schema(table, indexes: false) %>
19
+ <%= db.dump_table_schema(table, options) %>
20
20
  <% end %>
21
21
  end
22
22
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Tapsoob
3
- VERSION = "0.5.12".freeze
3
+ VERSION = "0.5.13".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapsoob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.12
4
+ version: 0.5.13
5
5
  platform: java
6
6
  authors:
7
7
  - Félix Bellanger