You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
%x( #{mysql_command} -e "CREATE USER IF NOT EXISTS '#{connection["username"]}'@'%';" )
233
+
%x( #{mysql_command} -e "GRANT ALL PRIVILEGES ON #{connection["database"]}.* to '#{connection["username"]}'@'%'" )
234
+
%x( #{mysql_command} -e "GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.* to '#{connection["username"]}'@'%';" )
238
235
end
239
236
end
240
237
241
238
desc"Build the MySQL test databases"
242
239
taskbuild: ["db:mysql:build_user"]do
243
-
%x( mysql #{mysql2_connection_arguments["arunit"]} -e "create DATABASE IF NOT EXISTS #{mysql2_config["arunit"]["database"]} DEFAULT CHARACTER SET utf8mb4" )
244
-
%x( mysql #{mysql2_connection_arguments["arunit2"]} -e "create DATABASE IF NOT EXISTS #{mysql2_config["arunit2"]["database"]} DEFAULT CHARACTER SET utf8mb4" )
245
-
%x( mysql #{trilogy_connection_arguments["arunit"]} -e "create DATABASE IF NOT EXISTS #{trilogy_config["arunit"]["database"]} DEFAULT CHARACTER SET utf8mb4" )
246
-
%x( mysql #{trilogy_connection_arguments["arunit2"]} -e "create DATABASE IF NOT EXISTS #{trilogy_config["arunit2"]["database"]} DEFAULT CHARACTER SET utf8mb4" )
240
+
mysql_configs.eachdo |connection|
241
+
%x( mysql #{mysql_connection_arguments[connection]} -e "create DATABASE IF NOT EXISTS #{connection["database"]} DEFAULT CHARACTER SET utf8mb4" )
242
+
end
247
243
end
248
244
249
245
desc"Drop the MySQL test databases"
250
246
taskdrop: ["db:mysql:build_user"]do
251
-
%x( mysql #{mysql2_connection_arguments["arunit"]} -e "drop database IF EXISTS #{mysql2_config["arunit"]["database"]}" )
252
-
%x( mysql #{mysql2_connection_arguments["arunit2"]} -e "drop database IF EXISTS #{mysql2_config["arunit2"]["database"]}" )
253
-
254
-
%x( mysql #{trilogy_connection_arguments["arunit"]} -e "drop database IF EXISTS #{trilogy_config["arunit"]["database"]}" )
255
-
%x( mysql #{trilogy_connection_arguments["arunit2"]} -e "drop database IF EXISTS #{trilogy_config["arunit2"]["database"]}" )
247
+
mysql_configs.eachdo |connection|
248
+
%x( mysql #{mysql_connection_arguments[connection]} -e "drop database IF EXISTS #{connection["database"]}" )
0 commit comments