diff --git a/Gemfile b/Gemfile index 615a1d959f..75cbddfd77 100644 --- a/Gemfile +++ b/Gemfile @@ -162,7 +162,5 @@ if ENV["ORACLE_ENHANCED"] gem "activerecord-oracle_enhanced-adapter", github: "rsim/oracle-enhanced", branch: "master" end -# A gem necessary for Active Record tests with IBM DB. -gem "ibm_db" if ENV["IBM_DB"] gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem "wdm", ">= 0.1.0", platforms: [:mingw, :mswin, :x64_mingw, :mswin64] diff --git a/activerecord/Rakefile b/activerecord/Rakefile index 06138680ee..0704b933d5 100644 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -47,10 +47,10 @@ namespace :db do task drop: ["db:mysql:drop", "db:postgresql:drop"] end -%w( mysql2 postgresql sqlite3 sqlite3_mem db2 oracle jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb ).each do |adapter| +%w( mysql2 postgresql sqlite3 sqlite3_mem oracle jdbcmysql jdbcpostgresql jdbcsqlite3 jdbcderby jdbch2 jdbchsqldb ).each do |adapter| namespace :test do Rake::TestTask.new(adapter => "#{adapter}:env") { |t| - adapter_short = adapter == "db2" ? adapter : adapter[/^[a-z0-9]+/] + adapter_short = adapter[/^[a-z0-9]+/] t.libs << "test" t.test_files = (FileList["test/cases/**/*_test.rb"].reject { |x| x.include?("/adapters/") @@ -63,7 +63,7 @@ end namespace :isolated do task adapter => "#{adapter}:env" do - adapter_short = adapter == "db2" ? adapter : adapter[/^[a-z0-9]+/] + adapter_short = adapter[/^[a-z0-9]+/] puts [adapter, adapter_short].inspect dash_i = [ diff --git a/activerecord/test/config.example.yml b/activerecord/test/config.example.yml index f5e3ac3c19..79b7dacbd6 100644 --- a/activerecord/test/config.example.yml +++ b/activerecord/test/config.example.yml @@ -35,20 +35,6 @@ connections: database: <%= FIXTURES_ROOT %>/fixture_database_2.sqlite3 timeout: 5000 - db2: - arunit: - adapter: ibm_db - host: localhost - username: arunit - password: arunit - database: arunit - arunit2: - adapter: ibm_db - host: localhost - username: arunit - password: arunit - database: arunit2 - mysql2: arunit: username: rails diff --git a/railties/lib/rails/generators/database.rb b/railties/lib/rails/generators/database.rb index 461716efd0..6aa6404323 100644 --- a/railties/lib/rails/generators/database.rb +++ b/railties/lib/rails/generators/database.rb @@ -4,7 +4,7 @@ module Rails module Generators module Database # :nodoc: JDBC_DATABASES = %w( jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc ) - DATABASES = %w( mysql postgresql sqlite3 oracle frontbase ibm_db sqlserver ) + JDBC_DATABASES + DATABASES = %w( mysql postgresql sqlite3 oracle sqlserver ) + JDBC_DATABASES def initialize(*) super @@ -17,7 +17,6 @@ module Rails when "postgresql" then ["pg", [">= 0.18", "< 2.0"]] when "sqlite3" then ["sqlite3", ["~> 1.4"]] when "oracle" then ["activerecord-oracle_enhanced-adapter", nil] - when "frontbase" then ["ruby-frontbase", nil] when "sqlserver" then ["activerecord-sqlserver-adapter", nil] when "jdbcmysql" then ["activerecord-jdbcmysql-adapter", nil] when "jdbcsqlite3" then ["activerecord-jdbcsqlite3-adapter", nil] diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt b/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt deleted file mode 100644 index 53724f32b6..0000000000 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt +++ /dev/null @@ -1,51 +0,0 @@ -# FrontBase versions 4.x -# -# Get the bindings: -# gem install ruby-frontbase -# -# Configure Using Gemfile -# gem 'ruby-frontbase' -# -default: &default - adapter: frontbase - pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - host: localhost - username: <%= app_name %> - password: '' - -development: - <<: *default - database: <%= app_name %>_development - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: <%= app_name %>_test - -# As with config/credentials.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password or a full connection URL as an environment -# variable when you boot the app. For example: -# -# DATABASE_URL="frontbase://myuser:mypass@localhost/somedatabase" -# -# If the connection URL is provided in the special DATABASE_URL environment -# variable, Rails will automatically merge its configuration values on top of -# the values provided in this file. Alternatively, you can specify a connection -# URL environment variable explicitly: -# -# production: -# url: <%%= ENV['MY_APP_DATABASE_URL'] %> -# -# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full overview on how database connection configuration can be specified. -# -production: - <<: *default - database: <%= app_name %>_production - username: <%= app_name %> - password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %> diff --git a/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt b/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt deleted file mode 100644 index 67a7701ab8..0000000000 --- a/railties/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt +++ /dev/null @@ -1,87 +0,0 @@ -# IBM Dataservers -# -# Home Page -# https://github.com/dparnell/ibm_db -# -# To install the ibm_db gem: -# -# On Linux: -# . /home/db2inst1/sqllib/db2profile -# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include -# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib32 -# gem install ibm_db -# -# On Mac OS X 10.5: -# . /home/db2inst1/sqllib/db2profile -# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include -# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib32 -# export ARCHFLAGS="-arch i386" -# gem install ibm_db -# -# On Mac OS X 10.6: -# . /home/db2inst1/sqllib/db2profile -# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include -# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib64 -# export ARCHFLAGS="-arch x86_64" -# gem install ibm_db -# -# On Windows: -# Issue the command: gem install ibm_db -# -# Configure Using Gemfile -# gem 'ibm_db' -# -# -default: &default - adapter: ibm_db - pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - username: db2inst1 - password: - #schema: db2inst1 - #host: localhost - #port: 50000 - #account: my_account - #app_user: my_app_user - #application: my_application - #workstation: my_workstation - #security: SSL - #timeout: 10 - #authentication: SERVER - #parameterized: false - -development: - <<: *default - database: <%= app_name[0,4] %>_dev - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: <%= app_name[0,4] %>_tst - -# As with config/credentials.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password or a full connection URL as an environment -# variable when you boot the app. For example: -# -# DATABASE_URL="ibm-db://myuser:mypass@localhost/somedatabase" -# -# If the connection URL is provided in the special DATABASE_URL environment -# variable, Rails will automatically merge its configuration values on top of -# the values provided in this file. Alternatively, you can specify a connection -# URL environment variable explicitly: -# -# production: -# url: <%%= ENV['MY_APP_DATABASE_URL'] %> -# -# Read https://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full overview on how database connection configuration can be specified. -# -production: - <<: *default - database: <%= app_name %>_production - username: <%= app_name %> - password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %> diff --git a/railties/test/commands/db_system_change_test.rb b/railties/test/commands/db_system_change_test.rb index 2ff45a7878..374a9ce69f 100644 --- a/railties/test/commands/db_system_change_test.rb +++ b/railties/test/commands/db_system_change_test.rb @@ -26,8 +26,8 @@ class Rails::Command::Db::System::ChangeCommandTest < ActiveSupport::TestCase assert_match <<~MSG.squish, output Invalid value for --to option. Supported preconfigurations are: - mysql, postgresql, sqlite3, oracle, frontbase, - ibm_db, sqlserver, jdbcmysql, jdbcsqlite3, + mysql, postgresql, sqlite3, oracle, + sqlserver, jdbcmysql, jdbcsqlite3, jdbcpostgresql, jdbc. MSG end diff --git a/railties/test/generators/db_system_change_generator_test.rb b/railties/test/generators/db_system_change_generator_test.rb index 6afe01ad3b..7597fe935a 100644 --- a/railties/test/generators/db_system_change_generator_test.rb +++ b/railties/test/generators/db_system_change_generator_test.rb @@ -24,8 +24,8 @@ module Rails assert_match <<~MSG.squish, output Invalid value for --to option. Supported preconfigurations are: - mysql, postgresql, sqlite3, oracle, frontbase, - ibm_db, sqlserver, jdbcmysql, jdbcsqlite3, + mysql, postgresql, sqlite3, oracle, + sqlserver, jdbcmysql, jdbcsqlite3, jdbcpostgresql, jdbc. MSG end