Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def rename_index(table_name, old_name, new_name) #:nodoc:
#
# add_synonym :posts, "blog.posts"
# add_synonym :posts_seq, "blog.posts_seq"
# add_synonym :employees, "hr.employees@dblink", :force => true
# add_synonym :employees, "hr.employees", :force => true
#
def add_synonym(name, table_name, options = {})
sql = "CREATE".dup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,12 +779,7 @@ class ::TestComment < ActiveRecord::Base
describe "synonyms" do
before(:all) do
@conn = ActiveRecord::Base.connection
@db_link = "db_link"
@username = @db_link_username = CONNECTION_PARAMS[:username]
@db_link_password = CONNECTION_PARAMS[:password]
@db_link_database = CONNECTION_PARAMS[:database]
@conn.execute "DROP DATABASE LINK #{@db_link}" rescue nil
@conn.execute "CREATE DATABASE LINK #{@db_link} CONNECT TO #{@db_link_username} IDENTIFIED BY \"#{@db_link_password}\" USING '#{@db_link_database}'"
@username = CONNECTION_PARAMS[:username]
schema_define do
create_table :test_posts, force: true do |t|
t.string :title
Expand All @@ -796,7 +791,6 @@ class ::TestComment < ActiveRecord::Base
schema_define do
drop_table :test_posts
end
@conn.execute "DROP DATABASE LINK #{@db_link}" rescue nil
end

before(:each) do
Expand Down