mysql_to_pg_dump 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/mysql_to_pg_dump/tasks_helper.rb +3 -3
- data/lib/mysql_to_pg_dump/version.rb +1 -1
- data/lib/tasks/db.rake +7 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d41270a1a741e8d0e5259deaf1fcbfc5a7d1742a
|
4
|
+
data.tar.gz: 201b082f724821dc69cdc3ace48c34b21d20fa19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42d5e40c6c6fa64f889f14dbeaab8a5ebbd191b2e6bc0e911506c718d9c83524bc5f305eaaee01370146db91bb8b9f7658b32a4eefddb29f4f7ca3c4d82dcb92
|
7
|
+
data.tar.gz: f842d163123ac18baca339d4c6e4cc8a36804c84cb0a36885bd1a5d098aaff3cb0cc65638b53026428b36a0c8749f720e90356ea0d05d877c9e1a452fef23c70
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# MysqlToPgDump
|
2
2
|
This gem allows pull content from mysql db (on the remote server) and
|
3
3
|
load it into your local postgres database.
|
4
|
-
Technically,
|
4
|
+
Technically, dump is not using - but result is almost the same.
|
5
5
|
|
6
6
|
## Usage
|
7
7
|
Copy content of remote mysql db to tmp/db_server_data as .csv files.
|
data/lib/tasks/db.rake
CHANGED
@@ -40,14 +40,15 @@ namespace :db do
|
|
40
40
|
task load: :environment do
|
41
41
|
printf "Current env db data will be destroyed.\n".red
|
42
42
|
printf "Are you sure? (y/n)\n"
|
43
|
-
|
43
|
+
confirm_input = STDIN.gets.strip
|
44
44
|
|
45
|
-
if
|
45
|
+
if confirm_input == 'y'
|
46
46
|
if data_already_pulled?
|
47
47
|
clean_database
|
48
48
|
db_tables.each do |t|
|
49
49
|
system %(psql -d #{dev['database']} -c "#{psql_import_query(t)} #{psql_set_sequence(t)}")
|
50
50
|
end
|
51
|
+
system 'clear'
|
51
52
|
printf "Your db data now is equal to production\n".green
|
52
53
|
else
|
53
54
|
printf "No pulled data. Run 'rake db:pull' first\n".yellow
|
@@ -64,11 +65,11 @@ namespace :db do
|
|
64
65
|
"deleted from /tmp successfully\n".green
|
65
66
|
end
|
66
67
|
|
67
|
-
desc "Pulls remote mysql db data, then loads it to " \
|
68
|
-
"local postgres and cleans junk"
|
69
|
-
task force: ['db:pull', 'db:pull:load', 'db:pull:clean']
|
70
|
-
|
71
68
|
desc "Pulls remote mysql db data and loads it to local psql"
|
72
69
|
task reload: ['db:pull', 'db:pull:load']
|
70
|
+
|
71
|
+
desc "Pulls remote mysql db data, then loads it to " \
|
72
|
+
"local postgres and cleans junk"
|
73
|
+
task force: ['db:pull:reload', 'db:pull:clean']
|
73
74
|
end
|
74
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql_to_pg_dump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimkarodinz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|