declare_schema 0.5.0.pre.1 → 0.5.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ccbc2eaebebe0d0282fa06e0ccbcd72f4a9ae412dccf893216d8620ebfa1213
|
4
|
+
data.tar.gz: 5af4528dda73c033236ca7c6ef63edd5d16d48854c429e4e937f06c84a9412a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb2ac5caa9b72a92d91027a339aedde5ea52102f4670e82fc62a45575a3044ac587c77c0132cc8d4b650db228c2a90be34fb8faa617a13b1333157a69914bdfe
|
7
|
+
data.tar.gz: 2f48111f9fcc5c4a6774f82acfb4731cb19f702891b218b19db8247330bd1a64428b25c761bf42e2810ca1719419eb466aa9706f4cead194c453680353ea2c1f
|
data/Gemfile.lock
CHANGED
@@ -179,9 +179,9 @@ module DeclareSchema
|
|
179
179
|
defaults = connection.select_one(<<~EOS)
|
180
180
|
SELECT C.character_set_name, C.collation_name
|
181
181
|
FROM information_schema.`COLUMNS` C
|
182
|
-
WHERE C.table_schema = #{connection.quote_string(database_name)} AND
|
183
|
-
C.table_name = #{connection.quote_string(table_name)} AND
|
184
|
-
C.column_name = #{connection.quote_string(column_name)};
|
182
|
+
WHERE C.table_schema = '#{connection.quote_string(database_name)}' AND
|
183
|
+
C.table_name = '#{connection.quote_string(table_name)}' AND
|
184
|
+
C.column_name = '#{connection.quote_string(column_name)}';
|
185
185
|
EOS
|
186
186
|
|
187
187
|
defaults["character_set_name"] or raise "character_set_name missing from #{defaults.inspect}"
|
@@ -30,8 +30,8 @@ module DeclareSchema
|
|
30
30
|
SELECT CCSA.character_set_name, CCSA.collation_name
|
31
31
|
FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
|
32
32
|
WHERE CCSA.collation_name = T.table_collation AND
|
33
|
-
T.table_schema = #{connection.quote_string(database)} AND
|
34
|
-
T.table_name = #{connection.quote_string(table_name)};
|
33
|
+
T.table_schema = '#{connection.quote_string(database)}' AND
|
34
|
+
T.table_name = '#{connection.quote_string(table_name)}';
|
35
35
|
EOS
|
36
36
|
|
37
37
|
defaults["character_set_name"] or raise "character_set_name missing from #{defaults.inspect}"
|
@@ -60,15 +60,15 @@ RSpec.describe DeclareSchema::Model::TableOptionsDefinition do
|
|
60
60
|
double(ActiveRecord::ConnectionAdapters::Mysql2Adapter).tap do |stub_connection|
|
61
61
|
expect(stub_connection).to receive(:class).and_return(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
|
62
62
|
expect(stub_connection).to receive(:current_database).and_return('test_database')
|
63
|
-
expect(stub_connection).to receive(:quote_string).with('test_database').and_return('
|
64
|
-
expect(stub_connection).to receive(:quote_string).with(model_class.table_name).and_return(
|
63
|
+
expect(stub_connection).to receive(:quote_string).with('test_database').and_return('test_database')
|
64
|
+
expect(stub_connection).to receive(:quote_string).with(model_class.table_name).and_return(model_class.table_name)
|
65
65
|
expect(stub_connection).to(
|
66
66
|
receive(:select_one).with(<<~EOS)
|
67
67
|
SELECT CCSA.character_set_name, CCSA.collation_name
|
68
68
|
FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
|
69
69
|
WHERE CCSA.collation_name = T.table_collation AND
|
70
|
-
T.table_schema =
|
71
|
-
T.table_name =
|
70
|
+
T.table_schema = 'test_database' AND
|
71
|
+
T.table_name = '#{model_class.table_name}';
|
72
72
|
EOS
|
73
73
|
.and_return({ "character_set_name" => "utf8", "collation_name" => "utf8_general" })
|
74
74
|
)
|