-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
51 lines (32 loc) · 1.53 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ActiveRecordOracleExtensions
============================
THIS PLUGIN IS DEPRECATED. THESE FEATURES HAVE BEEN ADDED TO THE ActiveRecord Oracle Enhanced Adapter.
https://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