Skip to content

eyestreet/active_record_oracle_extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActiveRecordOracleExtensions
============================

THIS PLUGIN IS DEPRECATED. THESE FEATURES HAVE BEEN ADDED TO THE ActiveRecord Oracle Enhanced Adapter.

http://github.com/rsim/oracle-enhanced


This plugin provides Oracle support for the following:

-- adding and removing foreign keys from within a rails migration. 
-- disabling foreign key constraints during the loading of fixtures so that you don't have to worry about the order of creation and inserts of your data via
your fixtures.
-- adding and removing synonyms from within a rails migration.
-- A patch for Rails 2.2 that fixes table alias syntax issues with preloading associations

I based this code off of 

atmos.org - http://sample.caboo.se/plugins/atmos/activerecord_foreign_key_extensions 

which was an update for oracle support to the
 
bubbleware.com - http://www.bubbleshare.com/tools/ActiveRecordExtensions.zip

However, neither of these seems to be up actively developed so I have rolled the Oracle specific pieces into this plugin.

Example
=======

Adding a foreign key constraint:

def self.up
    create_table :assets, :force => true do |t|
      t.integer :media_record_id
      t.string  :media_file_name
      t.string  :media_content_type
      t.integer :media_file_size
      t.datetime :media_updated_at
      t.timestamps
    end
    add_foreign_key_constraint :assets, :media_record_id, :media_records, :id

 end

Adding a synonym events for foo.events:

add_synonym :events, :foo, :events, :force => true



Copyright (c) 2008 Rob Christie, released under the MIT license

About

Support for foreign key migrations, synonyms, and disabling of referential integrity during fixture loads with oracle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages