db_structure_ext 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -3
- data/lib/db_structure_ext/version.rb +1 -1
- data/lib/tasks/database.rake +2 -2
- metadata +21 -39
data/README.md
CHANGED
@@ -8,6 +8,12 @@ Library **does not override** mysql adapter by default.
|
|
8
8
|
|
9
9
|
So you can use extensions independently (via MysqlConnectionProxy) or include extension methods into adapter.
|
10
10
|
|
11
|
+
## Goals
|
12
|
+
|
13
|
+
* dump/load __full__ mysql structure (with tables/views/triggers/routines)
|
14
|
+
* dump/load mysql structure from any database/file to any file/database
|
15
|
+
* parallel_tests support in mysql structures
|
16
|
+
|
11
17
|
## Installation
|
12
18
|
|
13
19
|
gem install db_structure_ext
|
@@ -39,7 +45,9 @@ Extended *structure_dump* for mysql/mysql2 adapter dumps not only *tables*. It d
|
|
39
45
|
|
40
46
|
Method loads sql statements separated by *\n\n*
|
41
47
|
|
42
|
-
###
|
48
|
+
### parallel tests support
|
49
|
+
|
50
|
+
It supports [parallel_tests](https://github.com/grosser/parallel_tests) or another gems that use TEST_ENV_NUMBER variable for tests parallelization.
|
43
51
|
|
44
52
|
It prepends
|
45
53
|
|
@@ -53,7 +61,7 @@ Add to your *Rakefile*
|
|
53
61
|
|
54
62
|
require 'db_structure_ext/tasks'
|
55
63
|
|
56
|
-
In case Rails3
|
64
|
+
In case Rails3 it loads tasks automaticaly via railtie mechanizm.
|
57
65
|
|
58
66
|
### db:structure:dump
|
59
67
|
|
@@ -74,7 +82,7 @@ Synopsis:
|
|
74
82
|
|
75
83
|
rake db:structure:load[env,file] # Load SQL structure file to the database
|
76
84
|
|
77
|
-
|
85
|
+
It's opposite task to *db:structure:load* that allows to load db structure from specified file to specified db environment.
|
78
86
|
The arguments is the same as for previous task.
|
79
87
|
|
80
88
|
|
data/lib/tasks/database.rake
CHANGED
@@ -15,7 +15,7 @@ namespace :db do
|
|
15
15
|
|
16
16
|
case adapter_name = ActiveRecord::Base.connection.adapter_name
|
17
17
|
when /mysql/i
|
18
|
-
require 'db_structure_ext
|
18
|
+
require 'db_structure_ext'
|
19
19
|
connection_proxy = DbStructureExt::MysqlConnectionProxy.new(ActiveRecord::Base.connection)
|
20
20
|
File.open(file, "w+") { |f| f << connection_proxy.structure_dump }
|
21
21
|
else
|
@@ -34,7 +34,7 @@ namespace :db do
|
|
34
34
|
|
35
35
|
case adapter_name = ActiveRecord::Base.connection.adapter_name
|
36
36
|
when /mysql/i
|
37
|
-
require 'db_structure_ext
|
37
|
+
require 'db_structure_ext'
|
38
38
|
connection_proxy = DbStructureExt::MysqlConnectionProxy.new(ActiveRecord::Base.connection)
|
39
39
|
connection_proxy.structure_load(file)
|
40
40
|
else
|
metadata
CHANGED
@@ -1,33 +1,24 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: db_structure_ext
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Andriy Yanko
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-10-12 00:00:00 Z
|
12
|
+
date: 2011-10-12 00:00:00.000000000Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
|
-
|
22
|
-
email:
|
14
|
+
description: Extended rails tasks db:structure:dump/load methods that supports mysql
|
15
|
+
views/triggers/routines
|
16
|
+
email:
|
23
17
|
- andriy.yanko@gmail.com
|
24
18
|
executables: []
|
25
|
-
|
26
19
|
extensions: []
|
27
|
-
|
28
20
|
extra_rdoc_files: []
|
29
|
-
|
30
|
-
files:
|
21
|
+
files:
|
31
22
|
- .gitignore
|
32
23
|
- Gemfile.ar01_r186
|
33
24
|
- Gemfile.ar01_r186.lock
|
@@ -53,37 +44,28 @@ files:
|
|
53
44
|
- spec/spec_helper.rb
|
54
45
|
homepage: https://github.com/railsware/db_structure_ext/
|
55
46
|
licenses: []
|
56
|
-
|
57
47
|
post_install_message:
|
58
48
|
rdoc_options: []
|
59
|
-
|
60
|
-
require_paths:
|
49
|
+
require_paths:
|
61
50
|
- lib
|
62
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
52
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
|
68
|
-
|
69
|
-
- 0
|
70
|
-
version: "0"
|
71
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
58
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
77
|
-
segments:
|
78
|
-
- 0
|
79
|
-
version: "0"
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
80
63
|
requirements: []
|
81
|
-
|
82
64
|
rubyforge_project: db_structure_ext
|
83
65
|
rubygems_version: 1.8.6
|
84
66
|
signing_key:
|
85
67
|
specification_version: 3
|
86
68
|
summary: ActiveRecord connection adapter extensions
|
87
|
-
test_files:
|
69
|
+
test_files:
|
88
70
|
- spec/db_sctructure_ext/mysql_connection_proxy_spec.rb
|
89
71
|
- spec/spec_helper.rb
|