oracle-enhanced-enhanced 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oracle-enhanced-enhanced (0.1.3)
4
+ oracle-enhanced-enhanced (0.1.6)
5
5
  activerecord-oracle_enhanced-adapter
6
6
 
7
7
  GEM
data/README.rdoc CHANGED
@@ -10,7 +10,8 @@ Add this gem to your project and it will override the following defaults:
10
10
 
11
11
  * sequences will be created with the +start_value+ options: <tt>1 NOCACHE ORDER</tt>
12
12
  * +cache_columns+ is set to +true+, saving loads in terms of data dictionary lookups (but requiring a restart if you change a table)
13
- * primary key columns will be created as NUMBER(12) instead of NUMBER(38)
13
+ * primary/foreign key columns will be created as NUMBER(12) instead of NUMBER(38)
14
+ * integer columns will default to NUMBER(12) instead of NUMBER(38)
14
15
  * +TEXT+ fields are stored as <tt>VARCHAR2(4000)</tt> instead of +CLOB+
15
16
 
16
17
  === Converting CLOB Columns to VARCHAR2
@@ -54,4 +55,3 @@ None
54
55
  == Copyright
55
56
 
56
57
  Copyright (c) 2011 Steve Lamotte. See LICENSE.txt for further details.
57
-
@@ -7,8 +7,8 @@ module ActiveRecord
7
7
  # Maximum length of an Oracle VARCHAR2 field
8
8
  VARCHAR2_MAX_LENGTH = 4000
9
9
 
10
- # Length of an Oracle primary key field
11
- PRIMARY_KEY_LENGTH = 12
10
+ # Default length of an Oracle integer field (as opposed to NUMBER(38))
11
+ INTEGER_LENGTH = 12
12
12
 
13
13
  # Indicate whether to use varchar2(length) for TEXT columns or clob (default).
14
14
  # Pass true or false to select varchar2 or clob, respectively. Optionally pass in the desired varchar2 length.
@@ -28,8 +28,9 @@ module ActiveRecord
28
28
 
29
29
  # Enable our enhanced settings/defaults
30
30
  def self.set_enhanced_defaults
31
- # Use sane length for PK fields
32
- NATIVE_DATABASE_TYPES[:primary_key] = "NUMBER(#{PRIMARY_KEY_LENGTH}) NOT NULL PRIMARY KEY"
31
+ # Use sane length for PK/FK fields
32
+ NATIVE_DATABASE_TYPES[:primary_key] = "NUMBER(#{INTEGER_LENGTH}) NOT NULL PRIMARY KEY"
33
+ NATIVE_DATABASE_TYPES[:integer][:limit] = INTEGER_LENGTH
33
34
 
34
35
  # Use varchar2(4000) for TEXT fields
35
36
  set_text_storage_representation true
@@ -1,7 +1,7 @@
1
1
  module Oracle
2
2
  module Enhanced
3
3
  module Enhanced
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oracle-enhanced-enhanced
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steve Lamotte
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-29 00:00:00 -06:00
18
+ date: 2011-11-30 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency