fast_change_table 1.0.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/fast_change_table.gemspec +1 -1
- data/lib/fast_change_table/fast_change_table.rb +2 -2
- data/lib/fast_change_table/version.rb +1 -1
- metadata +6 -5
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Use fast\_change\_table instead of change_table in your migrations on large tabl
|
|
6
6
|
uses ordinary change_table syntax but adds two options
|
7
7
|
|
8
8
|
* "replace\_keys" to remove all indexes; new indexes will be specified
|
9
|
-
- "disable\_keys" to remove indexes and apply them after data load; this is a tremendous performance enhancement for a dbms with fast index creation
|
9
|
+
- "disable\_keys" to remove indexes and apply them after data load; this is a tremendous performance enhancement for a dbms with fast index creation; it is active by default. set it to false to prevent its use
|
10
10
|
|
11
11
|
__Example:__
|
12
12
|
|
data/fast_change_table.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = FastChangeTable::VERSION
|
8
8
|
s.authors = ["Grady Griffin"]
|
9
9
|
s.email = ["gradyg@izea.com"]
|
10
|
-
s.homepage = "https://github.com/
|
10
|
+
s.homepage = "https://github.com/thgboat/fast_change_table"
|
11
11
|
s.summary = %q{Faster table changes}
|
12
12
|
s.description = %q{Uses table duplication to speed up migrations on large tables}
|
13
13
|
|
@@ -13,10 +13,10 @@ module FastChangeTable
|
|
13
13
|
begin
|
14
14
|
create_table_like(old_table_name, table_name, options)
|
15
15
|
renamed_columns = change_table_with_remaps(table_name, &block)
|
16
|
-
index_list = options[:disable_keys] ? disable_indexes(table_name)
|
16
|
+
index_list = options[:disable_keys] == false ? [] : disable_indexes(table_name)
|
17
17
|
#prepare the columns names for the insert statements
|
18
18
|
copy_table(old_table_name, table_name, renamed_columns)
|
19
|
-
enable_indexes(table_name, index_list)
|
19
|
+
enable_indexes(table_name, index_list) unless options[:disable_keys] == false
|
20
20
|
drop_table(old_table_name)
|
21
21
|
rescue Exception => e
|
22
22
|
puts "#{e}\n#{e.backtrace}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_change_table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Grady Griffin
|
@@ -71,6 +71,7 @@ extra_rdoc_files: []
|
|
71
71
|
|
72
72
|
files:
|
73
73
|
- .gitignore
|
74
|
+
- CHANGELOG.md
|
74
75
|
- Gemfile
|
75
76
|
- Gemfile.lock
|
76
77
|
- README.md
|
@@ -82,7 +83,7 @@ files:
|
|
82
83
|
- lib/fast_change_table/version.rb
|
83
84
|
- spec/fast_change_table_spec.rb
|
84
85
|
- spec/spec_helper.rb
|
85
|
-
homepage: https://github.com/
|
86
|
+
homepage: https://github.com/thgboat/fast_change_table
|
86
87
|
licenses: []
|
87
88
|
|
88
89
|
post_install_message:
|