ridgepole 0.5.3.beta2 → 0.5.3.beta4
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/lib/ridgepole/execute_expander.rb +20 -17
- data/lib/ridgepole/ext/mysql_awesome.rb +5 -1
- data/lib/ridgepole/version.rb +1 -1
- 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: 4836232269876c37ac6d3c9bdcf2f1495d4620d4
|
4
|
+
data.tar.gz: f7e856a5c6de4b9ea7ba2e66ac9c9c277e97a2fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79e5383609e65c7847ebfcd48c76c86867a3efdb5c0274938febc79cfd73d079952b8738e81e57a3a152221277ad27d84f7b2779b7e5ef0daddbbe0659fd3ec9
|
7
|
+
data.tar.gz: 87232f87adb82294b2218b8b4b112ab10f54d9293208e305c0ae337cbbf6a0120c2caa4d478e656c3e5d3350fba91bdfb77f9e7a44030ceec43128fd26e50455
|
@@ -70,28 +70,31 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements
|
|
70
70
|
alias_method_chain :index_name_exists?, :noop
|
71
71
|
end
|
72
72
|
|
73
|
-
|
73
|
+
begin
|
74
|
+
require 'active_record/connection_adapters/sqlite3_adapter'
|
74
75
|
|
75
|
-
class ActiveRecord::ConnectionAdapters::SQLite3Adapter
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
class ActiveRecord::ConnectionAdapters::SQLite3Adapter
|
77
|
+
def exec_query_with_noop(sql, name = nil, binds = [])
|
78
|
+
if Ridgepole::ExecuteExpander.noop
|
79
|
+
if (callback = Ridgepole::ExecuteExpander.callback)
|
80
|
+
callback.call(sql, name)
|
81
|
+
end
|
82
|
+
else
|
83
|
+
exec_query_without_noop(sql, name, binds)
|
80
84
|
end
|
81
|
-
else
|
82
|
-
exec_query_without_noop(sql, name, binds)
|
83
85
|
end
|
84
|
-
|
85
|
-
alias_method_chain :exec_query, :noop
|
86
|
+
alias_method_chain :exec_query, :noop
|
86
87
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
88
|
+
def copy_table_with_noop(from, to, options = {})
|
89
|
+
if Ridgepole::ExecuteExpander.noop
|
90
|
+
if (callback = Ridgepole::ExecuteExpander.callback)
|
91
|
+
callback.call("COPY TABLE #{from} TO #{to}")
|
92
|
+
end
|
93
|
+
else
|
94
|
+
copy_table_without_noop(from, to, options)
|
91
95
|
end
|
92
|
-
else
|
93
|
-
copy_table_without_noop(from, to, options)
|
94
96
|
end
|
97
|
+
alias_method_chain :copy_table, :noop
|
95
98
|
end
|
96
|
-
|
99
|
+
rescue LoadError
|
97
100
|
end
|
@@ -3,6 +3,10 @@ class ActiveRecord::ConnectionAdapters::TableDefinition
|
|
3
3
|
alias primary_key_without_unsigned primary_key
|
4
4
|
|
5
5
|
def primary_key(name, type = :primary_key, options = {})
|
6
|
-
|
6
|
+
if options.has_key?(:id)
|
7
|
+
primary_key_without_unsigned(name, type, options)
|
8
|
+
else
|
9
|
+
primary_key_without_unsigned(name, type, options.merge(primary_key: true).reverse_merge(unsigned: true))
|
10
|
+
end
|
7
11
|
end
|
8
12
|
end
|
data/lib/ridgepole/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridgepole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.3.
|
4
|
+
version: 0.5.3.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|