database_copy 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f14c6795b542d52c9c45348801942e5b4b00195ca5ff1aea7fe077aaa9ee3dd7
4
+ data.tar.gz: ccda5ff90d6636d71b37679109f5db7453cae1faef3baf7b6aa311b34ee7ea41
5
+ SHA512:
6
+ metadata.gz: 210ebe0ea48645fea88c741caaf19065f5d2b82ba734aa794240d1e5c388ccb5c599de8876af8937551ed48acc1721b0106929b9b00ecf00760dd5d3d35e2639
7
+ data.tar.gz: 2db628e9530b29f4d126481885ba0b12a9ccdcca8bc81ce071d249aa23ccd05e60b37fb9d509176119813dfea2a1cabc8bb6d31e484b56403304ab89e500768c
data/.rubocop.yml ADDED
@@ -0,0 +1,7 @@
1
+ require: standard
2
+
3
+ inherit_gem:
4
+ standard: config/base.yml
5
+
6
+ AllCops:
7
+ TargetRubyVersion: 3.2
data/.solargraph.yml ADDED
@@ -0,0 +1,20 @@
1
+ include:
2
+ - "**/*.rb"
3
+ exclude:
4
+ - spec/**/*
5
+ - test/**/*
6
+ - vendor/**/*
7
+ - ".bundle/**/*"
8
+ require:
9
+ - actioncable
10
+ - actionmailer
11
+ - actionpack
12
+ - actionview
13
+ - activejob
14
+ - activemodel
15
+ - activerecord
16
+ - activestorage
17
+ - activesupport
18
+ plugins:
19
+ - solargraph-rails
20
+ max_files: 5000
data/.standard.yml ADDED
@@ -0,0 +1,7 @@
1
+ fix: true # default: false
2
+ parallel: true # default: false
3
+ format: progress # default: Standard::Formatter
4
+ ruby_version: 3.2.2 # default: RUBY_VERSION
5
+ default_ignores: false # default: true
6
+
7
+ ignore: # default: []
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-06-14
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at mario.chavez@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in database_copy.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "standard", "~> 1.3"
data/Gemfile.lock ADDED
@@ -0,0 +1,72 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ database_copy (0.1.0)
5
+ pastel (~> 0.8.0)
6
+ pg (~> 1.5, >= 1.5.3)
7
+ tty-spinner (~> 0.9.3)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ast (2.4.2)
13
+ json (2.6.3)
14
+ language_server-protocol (3.17.0.3)
15
+ lint_roller (1.0.0)
16
+ minitest (5.18.0)
17
+ parallel (1.23.0)
18
+ parser (3.2.2.3)
19
+ ast (~> 2.4.1)
20
+ racc
21
+ pastel (0.8.0)
22
+ tty-color (~> 0.5)
23
+ pg (1.5.3)
24
+ racc (1.7.1)
25
+ rainbow (3.1.1)
26
+ rake (13.0.6)
27
+ regexp_parser (2.8.1)
28
+ rexml (3.2.5)
29
+ rubocop (1.52.1)
30
+ json (~> 2.3)
31
+ parallel (~> 1.10)
32
+ parser (>= 3.2.2.3)
33
+ rainbow (>= 2.2.2, < 4.0)
34
+ regexp_parser (>= 1.8, < 3.0)
35
+ rexml (>= 3.2.5, < 4.0)
36
+ rubocop-ast (>= 1.28.0, < 2.0)
37
+ ruby-progressbar (~> 1.7)
38
+ unicode-display_width (>= 2.4.0, < 3.0)
39
+ rubocop-ast (1.29.0)
40
+ parser (>= 3.2.1.0)
41
+ rubocop-performance (1.18.0)
42
+ rubocop (>= 1.7.0, < 2.0)
43
+ rubocop-ast (>= 0.4.0)
44
+ ruby-progressbar (1.13.0)
45
+ standard (1.29.0)
46
+ language_server-protocol (~> 3.17.0.2)
47
+ lint_roller (~> 1.0)
48
+ rubocop (~> 1.52.0)
49
+ standard-custom (~> 1.0.0)
50
+ standard-performance (~> 1.1.0)
51
+ standard-custom (1.0.1)
52
+ lint_roller (~> 1.0)
53
+ standard-performance (1.1.0)
54
+ lint_roller (~> 1.0)
55
+ rubocop-performance (~> 1.18.0)
56
+ tty-color (0.6.0)
57
+ tty-cursor (0.7.1)
58
+ tty-spinner (0.9.3)
59
+ tty-cursor (~> 0.7)
60
+ unicode-display_width (2.4.2)
61
+
62
+ PLATFORMS
63
+ arm64-darwin-22
64
+
65
+ DEPENDENCIES
66
+ database_copy!
67
+ minitest (~> 5.0)
68
+ rake (~> 13.0)
69
+ standard (~> 1.3)
70
+
71
+ BUNDLED WITH
72
+ 2.4.12
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Mario Alberto Chávez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # Database Copy
2
+
3
+ This gem simplifies the process of database migration or replication by providing a straightforward interface to copy tables and their data, while allowing fine-grained control over the selection of tables and attributes.
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+
9
+ $ bundle add database_copy
10
+
11
+ If bundler is not being used to manage dependencies, install the gem by executing:
12
+
13
+ $ gem install database_copy
14
+
15
+ ## Usage
16
+
17
+ After gem is installed copy a source database to a target. Provide the two params, source and target, as database URL.
18
+
19
+ $ database_copy postgres://source postgres://target
20
+
21
+ ## Development
22
+
23
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
+
25
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/creditario/database_copy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/database_copy/blob/main/CODE_OF_CONDUCT.md).
30
+
31
+ ## License
32
+
33
+ The gem is available as open source under the terms of the [MIT License](https://github.com/creditario/database_copy/blob/main/LICENSE.txt).
34
+
35
+ ## Code of Conduct
36
+
37
+ Everyone interacting in the DatabaseCopy project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/creditario/database_copy/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ require "standard/rake"
13
+
14
+ task default: %i[test standard]
data/exe/database_copy ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "database_copy"
6
+
7
+ DatabaseCopy::ImportUI.start(":spinner ")
8
+
9
+ if ARGV.size != 2
10
+ DatabaseCopy::ImportUI.error("Needs two arguments: source database URL and target database URL")
11
+ return
12
+ end
13
+
14
+ DatabaseCopy::ImportUI.warn("BEWARE this script might destroy target database. make sure you have the right params source and target.")
15
+ DatabaseCopy::ImportUI.warn("SOURCE #{ARGV[0]}")
16
+ DatabaseCopy::ImportUI.warn("TARGET #{ARGV[1]}")
17
+
18
+ puts ""
19
+ DatabaseCopy::ImportUI.warn("If you want to stop this program execution press CTRL+C right now! or press ENTER to continue.")
20
+
21
+ $stdin.gets.chomp
22
+
23
+ copier = DatabaseCopy::Executor.new(source_db: ARGV[0], target_db: ARGV[1])
24
+ copier.copy_database
25
+
26
+ DatabaseCopy::ImportUI.finish("Copy is done. Now create a PG Dump of target.")
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DatabaseCopy
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,170 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "pg"
4
+ require "tty-spinner"
5
+ require "pastel"
6
+
7
+ require_relative "database_copy/version"
8
+
9
+ module DatabaseCopy
10
+ TABLES = [:accessory_applicables, :accessory_results, :action_text_rich_texts, :active_storage_attachments, :attachments, :active_storage_blobs, :catalogs, :contract_templates, :credits, :crowdfunding_contract_templates, :contracts, :credit_applications, :crowdfunding_contracts, :crowdfunding_crowdfunds, :crowdfunding_funds, :crowdfunding_investors, :crowdfunding_movements, :crowdfunding_settings, :events, :expenses, :holidays, :incomes, :customers, :movements, :installment_plans, :installments, :product_accessories, :payments, :promotions, :references, :score_flows, :users, :score_component_results, :score_components, :accessories, :products]
11
+ EXCLUDE_COLUMNS = [:updated_at, :uid, :organization_id, :uuid]
12
+
13
+ class Error < StandardError; end
14
+
15
+ module ImportUI
16
+ @@spinner = nil
17
+
18
+ def self.start(message)
19
+ @@spinner ||= TTY::Spinner.new(message)
20
+ @@spinner&.auto_spin
21
+ end
22
+
23
+ def self.error(message)
24
+ @@spinner&.error(message)
25
+ end
26
+
27
+ def self.clear_line
28
+ @@spinner&.clear_line
29
+ end
30
+
31
+ def self.finish(message = "")
32
+ @@spinner&.success(message)
33
+ end
34
+
35
+ def self.info(message)
36
+ clear_line
37
+ puts message
38
+ end
39
+
40
+ def self.warn(message)
41
+ clear_line
42
+ puts color.yellow message
43
+ end
44
+
45
+ def self.color
46
+ @@color ||= Pastel.new
47
+ end
48
+ end
49
+
50
+ class Executor
51
+ def initialize(source_db:, target_db:)
52
+ @source_db = source_db
53
+ @target_db = target_db
54
+ end
55
+
56
+ def copy_database
57
+ copy_tables
58
+ end
59
+
60
+ private
61
+
62
+ def copy_tables
63
+ source_conn = connect_to_database(@source_db)
64
+ target_conn = connect_to_database(@target_db)
65
+
66
+ TABLES.each do |table_name|
67
+ create_table(source_conn, target_conn, table_name.to_s)
68
+ copy_table(source_conn, target_conn, table_name.to_s)
69
+ end
70
+
71
+ source_conn.close
72
+ target_conn.close
73
+ end
74
+
75
+ def create_table(source_conn, target_conn, table_name)
76
+ ddl = generate_create_table_command(source_conn, table_name)
77
+
78
+ target_conn.exec(ddl.sub(/CREATE TABLE/, "CREATE TABLE IF NOT EXISTS"))
79
+ end
80
+
81
+ def copy_table(source_conn, target_conn, table_name)
82
+ ImportUI.info("Copying table #{table_name}")
83
+ columns = table_columns(source_conn, table_name)
84
+
85
+ data = source_conn.exec("SELECT #{columns} FROM #{source_conn.escape_identifier(table_name)}")
86
+ data.each do |row|
87
+ row_columns = columns.split(",").map do |column|
88
+ value = row[column.strip]
89
+
90
+ if value.nil? || value == ""
91
+ "null"
92
+ elsif numeric_value?(value)
93
+ value
94
+ elsif value == "t"
95
+ true
96
+ elsif value == "f"
97
+ false
98
+ else
99
+ "'#{value.gsub("'", "''")}'"
100
+ end
101
+ end.join(", ")
102
+
103
+ sql = "INSERT INTO #{table_name} (#{columns}) VALUES (#{row_columns})"
104
+ target_conn.exec(sql)
105
+ end
106
+
107
+ ImportUI.info("Inserted #{data.count} records.")
108
+ end
109
+
110
+ def table_columns(conn, table_name)
111
+ excluded = EXCLUDE_COLUMNS.map { |c| "'#{c}'" }.join(", ")
112
+ result = conn.exec_params("SELECT column_name FROM information_schema.columns WHERE table_schema = 'public' AND table_name = $1 AND column_name NOT IN (#{excluded})", [table_name])
113
+
114
+ columns = result.map { |row| row["column_name"] }
115
+ columns.join(", ")
116
+ end
117
+
118
+ def connect_to_database(database)
119
+ PG::Connection.new(database)
120
+ end
121
+
122
+ def generate_create_table_command(conn, table_name)
123
+ result = conn.exec_params("SELECT pg_get_serial_sequence($1, column_name) AS serial_sequence, * FROM information_schema.columns WHERE table_schema = 'public' AND table_name = $1 ORDER BY ordinal_position", [table_name])
124
+
125
+ columns = result.map do |row|
126
+ if !EXCLUDE_COLUMNS.map(&:to_s).include?(row["column_name"])
127
+ column_name = row["column_name"]
128
+ default_value = (row["column_default"] && column_name != "id") ? "DEFAULT #{row["column_default"]}" : ""
129
+ data_type = cast_array(row["data_type"], default_value)
130
+ null_constraint = (row["is_nullable"] == "NO") ? "NOT NULL" : ""
131
+ serial_constraint = (row["serial_sequence"] && column_name != "id") ? "DEFAULT nextval('#{row["serial_sequence"]}'::regclass)" : ""
132
+
133
+ "#{conn.escape_identifier(column_name)} #{data_type} #{default_value} #{null_constraint} #{serial_constraint}"
134
+ end
135
+ end
136
+
137
+ primary_key = get_primary_key(conn, table_name)
138
+ primary_key_clause = primary_key ? ", PRIMARY KEY (#{primary_key})" : ""
139
+
140
+ "CREATE TABLE #{conn.escape_identifier(table_name)} (\n #{columns.compact.join(",\n ")}#{primary_key_clause}\n);"
141
+ end
142
+
143
+ def cast_array(data_type, default_value)
144
+ return data_type if data_type != "ARRAY"
145
+
146
+ if default_value.include?("integer")
147
+ "integer[]"
148
+ elsif default_value.include?("text")
149
+ "text[]"
150
+ else
151
+ default_value
152
+ end
153
+ end
154
+
155
+ def get_primary_key(conn, table_name)
156
+ result = conn.exec_params("SELECT a.attname
157
+ FROM pg_index i
158
+ JOIN pg_attribute a ON a.attrelid = i.indrelid
159
+ AND a.attnum = ANY(i.indkey)
160
+ WHERE i.indrelid = $1::regclass
161
+ AND i.indisprimary;", [table_name])
162
+
163
+ result.map { |row| conn.escape_identifier(row["attname"]) }.join(", ")
164
+ end
165
+
166
+ def numeric_value?(value)
167
+ !!value.match(/\A[+-]?\d+(\.\d+)?\z/)
168
+ end
169
+ end
170
+ end
@@ -0,0 +1,4 @@
1
+ module DatabaseCopy
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: database_copy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Mario Alberto Chávez
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-06-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pg
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.5.3
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.5'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.5.3
33
+ - !ruby/object:Gem::Dependency
34
+ name: tty-spinner
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: 0.9.3
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.9.3
47
+ - !ruby/object:Gem::Dependency
48
+ name: pastel
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: 0.8.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: 0.8.0
61
+ description: This gem simplifies the process of database migration or replication
62
+ by providing a straightforward interface to copy tables and their data, while allowing
63
+ fine-grained control over the selection of tables and attributes.
64
+ email:
65
+ - mario.chavez@gmail.com
66
+ executables:
67
+ - database_copy
68
+ extensions: []
69
+ extra_rdoc_files: []
70
+ files:
71
+ - ".rubocop.yml"
72
+ - ".solargraph.yml"
73
+ - ".standard.yml"
74
+ - CHANGELOG.md
75
+ - CODE_OF_CONDUCT.md
76
+ - Gemfile
77
+ - Gemfile.lock
78
+ - LICENSE.txt
79
+ - README.md
80
+ - Rakefile
81
+ - exe/database_copy
82
+ - lib/database_copy.rb
83
+ - lib/database_copy/version.rb
84
+ - sig/database_copy.rbs
85
+ homepage: https://aoorora.com
86
+ licenses:
87
+ - MIT
88
+ metadata:
89
+ homepage_uri: https://aoorora.com
90
+ source_code_uri: https://github.com/creditario/database_copy
91
+ changelog_uri: https://github.com/creditario/database_copy/blob/main/CHANGELOG.md
92
+ post_install_message:
93
+ rdoc_options: []
94
+ require_paths:
95
+ - lib
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 3.2.2
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ requirements: []
107
+ rubygems_version: 3.4.12
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: A Ruby gem for a simple way to copy data from one PostgreSQL database to
111
+ a blank one.
112
+ test_files: []