tenacity 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/EXTEND.rdoc +9 -13
- data/Rakefile +6 -0
- data/history.txt +17 -0
- data/lib/tenacity.rb +13 -9
- data/lib/tenacity/associate_proxy.rb +56 -0
- data/lib/tenacity/associates_proxy.rb +5 -3
- data/lib/tenacity/association.rb +81 -9
- data/lib/tenacity/associations/belongs_to.rb +28 -16
- data/lib/tenacity/associations/has_many.rb +113 -53
- data/lib/tenacity/associations/has_one.rb +33 -14
- data/lib/tenacity/class_methods.rb +117 -9
- data/lib/tenacity/errors.rb +9 -0
- data/lib/tenacity/instance_methods.rb +40 -3
- data/lib/tenacity/orm_ext/activerecord.rb +114 -95
- data/lib/tenacity/orm_ext/couchrest.rb +132 -113
- data/lib/tenacity/orm_ext/datamapper.rb +138 -112
- data/lib/tenacity/orm_ext/helpers.rb +36 -0
- data/lib/tenacity/orm_ext/mongo_mapper.rb +102 -84
- data/lib/tenacity/orm_ext/mongoid.rb +106 -87
- data/lib/tenacity/orm_ext/sequel.rb +137 -110
- data/lib/tenacity/version.rb +1 -1
- data/tenacity.gemspec +2 -1
- data/test/association_features/belongs_to_test.rb +46 -1
- data/test/association_features/has_many_test.rb +187 -2
- data/test/association_features/has_one_test.rb +57 -2
- data/test/associations/belongs_to_test.rb +41 -7
- data/test/associations/has_many_test.rb +59 -10
- data/test/associations/has_one_test.rb +57 -2
- data/test/fixtures/active_record_car.rb +5 -4
- data/test/fixtures/active_record_climate_control_unit.rb +1 -0
- data/test/fixtures/active_record_engine.rb +1 -0
- data/test/fixtures/active_record_has_many_target.rb +7 -0
- data/test/fixtures/active_record_has_one_target.rb +7 -0
- data/test/fixtures/active_record_object.rb +19 -0
- data/test/fixtures/couch_rest_has_many_target.rb +7 -0
- data/test/fixtures/couch_rest_has_one_target.rb +7 -0
- data/test/fixtures/couch_rest_object.rb +14 -0
- data/test/fixtures/data_mapper_has_many_target.rb +23 -3
- data/test/fixtures/data_mapper_has_one_target.rb +23 -3
- data/test/fixtures/data_mapper_object.rb +14 -0
- data/test/fixtures/mongo_mapper_air_filter.rb +6 -0
- data/test/fixtures/mongo_mapper_alternator.rb +7 -0
- data/test/fixtures/mongo_mapper_autosave_false_has_many_target.rb +8 -0
- data/test/fixtures/mongo_mapper_autosave_false_has_one_target.rb +8 -0
- data/test/fixtures/mongo_mapper_autosave_true_has_many_target.rb +8 -0
- data/test/fixtures/mongo_mapper_autosave_true_has_one_target.rb +8 -0
- data/test/fixtures/mongo_mapper_circuit_board.rb +6 -0
- data/test/fixtures/mongo_mapper_dashboard.rb +5 -2
- data/test/fixtures/mongo_mapper_has_many_target.rb +7 -0
- data/test/fixtures/mongo_mapper_has_one_target.rb +7 -0
- data/test/fixtures/mongo_mapper_object.rb +14 -0
- data/test/fixtures/mongo_mapper_wheel.rb +2 -0
- data/test/fixtures/mongo_mapper_windows.rb +6 -0
- data/test/fixtures/mongoid_has_many_target.rb +7 -0
- data/test/fixtures/mongoid_has_one_target.rb +7 -0
- data/test/fixtures/mongoid_object.rb +14 -0
- data/test/fixtures/sequel_has_many_target.rb +7 -0
- data/test/fixtures/sequel_has_one_target.rb +7 -0
- data/test/fixtures/sequel_object.rb +14 -0
- data/test/helpers/active_record_test_helper.rb +87 -8
- data/test/helpers/couch_rest_test_helper.rb +7 -0
- data/test/helpers/data_mapper_test_helper.rb +41 -3
- data/test/helpers/sequel_test_helper.rb +65 -9
- data/test/orm_ext/activerecord_test.rb +1 -1
- data/test/orm_ext/datamapper_test.rb +33 -24
- data/test/orm_ext/mongo_mapper_test.rb +6 -6
- data/test/orm_ext/mongoid_test.rb +6 -6
- data/test/orm_ext/sequel_test.rb +1 -1
- data/test/test_helper.rb +18 -9
- metadata +119 -55
@@ -15,5 +15,19 @@ class CouchRestObject < CouchRest::Model::Base
|
|
15
15
|
t_has_many :mongo_mapper_has_many_targets
|
16
16
|
require_mongoid { t_has_many :mongoid_has_many_targets }
|
17
17
|
t_has_many :sequel_has_many_targets
|
18
|
+
|
19
|
+
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
20
|
+
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
21
|
+
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
22
|
+
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
23
|
+
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
24
|
+
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
25
|
+
|
26
|
+
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
27
|
+
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
28
|
+
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
29
|
+
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
30
|
+
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
31
|
+
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
18
32
|
end
|
19
33
|
|
@@ -3,12 +3,25 @@ class DataMapperHasManyTarget
|
|
3
3
|
include Tenacity
|
4
4
|
|
5
5
|
property :id, Serial
|
6
|
-
property :active_record_object_id,
|
6
|
+
property :active_record_object_id, Integer
|
7
7
|
property :couch_rest_object_id, String
|
8
|
-
property :data_mapper_object_id,
|
8
|
+
property :data_mapper_object_id, Integer
|
9
9
|
property :mongo_mapper_object_id, String
|
10
10
|
property :mongoid_object_id, String
|
11
|
-
property :sequel_object_id,
|
11
|
+
property :sequel_object_id, Integer
|
12
|
+
|
13
|
+
property :active_record_has_many_target_testable_id, String
|
14
|
+
property :active_record_has_many_target_testable_type, String
|
15
|
+
property :couch_rest_has_many_target_testable_id, String
|
16
|
+
property :couch_rest_has_many_target_testable_type, String
|
17
|
+
property :data_mapper_has_many_target_testable_id, String
|
18
|
+
property :data_mapper_has_many_target_testable_type, String
|
19
|
+
property :mongo_mapper_has_many_target_testable_id, String
|
20
|
+
property :mongo_mapper_has_many_target_testable_type, String
|
21
|
+
property :mongoid_has_many_target_testable_id, String
|
22
|
+
property :mongoid_has_many_target_testable_type, String
|
23
|
+
property :sequel_has_many_target_testable_id, String
|
24
|
+
property :sequel_has_many_target_testable_type, String
|
12
25
|
|
13
26
|
t_belongs_to :active_record_object
|
14
27
|
t_belongs_to :couch_rest_object
|
@@ -16,4 +29,11 @@ class DataMapperHasManyTarget
|
|
16
29
|
t_belongs_to :mongo_mapper_object
|
17
30
|
require_mongoid { t_belongs_to :mongoid_object }
|
18
31
|
t_belongs_to :sequel_object
|
32
|
+
|
33
|
+
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
34
|
+
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
35
|
+
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
36
|
+
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
37
|
+
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
38
|
+
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
19
39
|
end
|
@@ -3,12 +3,25 @@ class DataMapperHasOneTarget
|
|
3
3
|
include Tenacity
|
4
4
|
|
5
5
|
property :id, Serial
|
6
|
-
property :active_record_object_id,
|
6
|
+
property :active_record_object_id, Integer
|
7
7
|
property :couch_rest_object_id, String
|
8
|
-
property :data_mapper_object_id,
|
8
|
+
property :data_mapper_object_id, Integer
|
9
9
|
property :mongo_mapper_object_id, String
|
10
10
|
property :mongoid_object_id, String
|
11
|
-
property :sequel_object_id,
|
11
|
+
property :sequel_object_id, Integer
|
12
|
+
|
13
|
+
property :active_record_has_one_target_testable_id, String
|
14
|
+
property :active_record_has_one_target_testable_type, String
|
15
|
+
property :couch_rest_has_one_target_testable_id, String
|
16
|
+
property :couch_rest_has_one_target_testable_type, String
|
17
|
+
property :data_mapper_has_one_target_testable_id, String
|
18
|
+
property :data_mapper_has_one_target_testable_type, String
|
19
|
+
property :mongo_mapper_has_one_target_testable_id, String
|
20
|
+
property :mongo_mapper_has_one_target_testable_type, String
|
21
|
+
property :mongoid_has_one_target_testable_id, String
|
22
|
+
property :mongoid_has_one_target_testable_type, String
|
23
|
+
property :sequel_has_one_target_testable_id, String
|
24
|
+
property :sequel_has_one_target_testable_type, String
|
12
25
|
|
13
26
|
t_belongs_to :active_record_object
|
14
27
|
t_belongs_to :couch_rest_object
|
@@ -16,4 +29,11 @@ class DataMapperHasOneTarget
|
|
16
29
|
t_belongs_to :mongo_mapper_object
|
17
30
|
require_mongoid { t_belongs_to :mongoid_object }
|
18
31
|
t_belongs_to :sequel_object
|
32
|
+
|
33
|
+
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
34
|
+
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
35
|
+
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
36
|
+
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
37
|
+
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
38
|
+
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
19
39
|
end
|
@@ -17,4 +17,18 @@ class DataMapperObject
|
|
17
17
|
t_has_many :mongo_mapper_has_many_targets
|
18
18
|
require_mongoid { t_has_many :mongoid_has_many_targets }
|
19
19
|
t_has_many :sequel_has_many_targets
|
20
|
+
|
21
|
+
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
22
|
+
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
23
|
+
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
24
|
+
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
25
|
+
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
26
|
+
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
27
|
+
|
28
|
+
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
29
|
+
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
30
|
+
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
31
|
+
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
32
|
+
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
33
|
+
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
20
34
|
end
|
@@ -2,10 +2,13 @@ class MongoMapperDashboard
|
|
2
2
|
include MongoMapper::Document
|
3
3
|
include Tenacity
|
4
4
|
|
5
|
+
key :prop, String
|
6
|
+
|
5
7
|
t_belongs_to :active_record_car
|
6
8
|
t_has_one :active_record_climate_control_unit
|
7
|
-
t_has_one :couch_rest_radio
|
8
9
|
|
9
10
|
t_has_many :vents, :class_name => 'MongoMapperVent', :foreign_keys_property => 'dashboard_vent_ids'
|
10
|
-
t_has_one :ash_tray, :class_name => 'MongoMapperAshTray'
|
11
|
+
t_has_one :ash_tray, :class_name => 'MongoMapperAshTray', :dependent => :destroy
|
12
|
+
|
13
|
+
t_has_many :mongo_mapper_circuit_boards, :as => :diagnosable
|
11
14
|
end
|
@@ -8,4 +8,11 @@ class MongoMapperHasManyTarget
|
|
8
8
|
t_belongs_to :mongo_mapper_object
|
9
9
|
require_mongoid { t_belongs_to :mongoid_object }
|
10
10
|
t_belongs_to :sequel_object
|
11
|
+
|
12
|
+
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
13
|
+
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
14
|
+
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
15
|
+
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
16
|
+
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
17
|
+
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
11
18
|
end
|
@@ -8,4 +8,11 @@ class MongoMapperHasOneTarget
|
|
8
8
|
t_belongs_to :mongo_mapper_object
|
9
9
|
require_mongoid { t_belongs_to :mongoid_object }
|
10
10
|
t_belongs_to :sequel_object
|
11
|
+
|
12
|
+
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
13
|
+
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
14
|
+
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
15
|
+
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
16
|
+
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
17
|
+
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
11
18
|
end
|
@@ -15,4 +15,18 @@ class MongoMapperObject
|
|
15
15
|
t_has_many :mongo_mapper_has_many_targets
|
16
16
|
require_mongoid { t_has_many :mongoid_has_many_targets }
|
17
17
|
t_has_many :sequel_has_many_targets
|
18
|
+
|
19
|
+
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
20
|
+
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
21
|
+
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
22
|
+
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
23
|
+
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
24
|
+
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
25
|
+
|
26
|
+
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
27
|
+
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
28
|
+
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
29
|
+
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
30
|
+
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
31
|
+
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
18
32
|
end
|
@@ -9,5 +9,12 @@ require_mongoid do
|
|
9
9
|
t_belongs_to :mongo_mapper_object
|
10
10
|
t_belongs_to :mongoid_object
|
11
11
|
t_belongs_to :sequel_object
|
12
|
+
|
13
|
+
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
14
|
+
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
15
|
+
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
16
|
+
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
17
|
+
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
18
|
+
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
12
19
|
end
|
13
20
|
end
|
@@ -9,5 +9,12 @@ require_mongoid do
|
|
9
9
|
t_belongs_to :mongo_mapper_object
|
10
10
|
t_belongs_to :mongoid_object
|
11
11
|
t_belongs_to :sequel_object
|
12
|
+
|
13
|
+
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
14
|
+
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
15
|
+
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
16
|
+
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
17
|
+
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
18
|
+
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
12
19
|
end
|
13
20
|
end
|
@@ -16,5 +16,19 @@ require_mongoid do
|
|
16
16
|
t_has_many :mongo_mapper_has_many_targets
|
17
17
|
t_has_many :mongoid_has_many_targets
|
18
18
|
t_has_many :sequel_has_many_targets
|
19
|
+
|
20
|
+
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
21
|
+
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
22
|
+
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
23
|
+
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
24
|
+
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
25
|
+
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
26
|
+
|
27
|
+
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
28
|
+
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
29
|
+
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
30
|
+
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
31
|
+
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
32
|
+
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
19
33
|
end
|
20
34
|
end
|
@@ -7,4 +7,11 @@ class SequelHasManyTarget < Sequel::Model
|
|
7
7
|
t_belongs_to :mongo_mapper_object
|
8
8
|
require_mongoid { t_belongs_to :mongoid_object }
|
9
9
|
t_belongs_to :sequel_object
|
10
|
+
|
11
|
+
t_belongs_to :active_record_has_many_target_testable, :polymorphic => true
|
12
|
+
t_belongs_to :couch_rest_has_many_target_testable, :polymorphic => true
|
13
|
+
t_belongs_to :data_mapper_has_many_target_testable, :polymorphic => true
|
14
|
+
t_belongs_to :mongo_mapper_has_many_target_testable, :polymorphic => true
|
15
|
+
require_mongoid { t_belongs_to :mongoid_has_many_target_testable, :polymorphic => true }
|
16
|
+
t_belongs_to :sequel_has_many_target_testable, :polymorphic => true
|
10
17
|
end
|
@@ -7,4 +7,11 @@ class SequelHasOneTarget < Sequel::Model
|
|
7
7
|
t_belongs_to :mongo_mapper_object
|
8
8
|
require_mongoid { t_belongs_to :mongoid_object }
|
9
9
|
t_belongs_to :sequel_object
|
10
|
+
|
11
|
+
t_belongs_to :active_record_has_one_target_testable, :polymorphic => true
|
12
|
+
t_belongs_to :couch_rest_has_one_target_testable, :polymorphic => true
|
13
|
+
t_belongs_to :data_mapper_has_one_target_testable, :polymorphic => true
|
14
|
+
t_belongs_to :mongo_mapper_has_one_target_testable, :polymorphic => true
|
15
|
+
require_mongoid { t_belongs_to :mongoid_has_one_target_testable, :polymorphic => true }
|
16
|
+
t_belongs_to :sequel_has_one_target_testable, :polymorphic => true
|
10
17
|
end
|
@@ -14,4 +14,18 @@ class SequelObject < Sequel::Model
|
|
14
14
|
t_has_many :mongo_mapper_has_many_targets
|
15
15
|
require_mongoid { t_has_many :mongoid_has_many_targets }
|
16
16
|
t_has_many :sequel_has_many_targets
|
17
|
+
|
18
|
+
t_has_one :active_record_has_one_target, :as => :active_record_has_one_target_testable
|
19
|
+
t_has_one :couch_rest_has_one_target, :as => :couch_rest_has_one_target_testable
|
20
|
+
t_has_one :data_mapper_has_one_target, :as => :data_mapper_has_one_target_testable
|
21
|
+
t_has_one :mongo_mapper_has_one_target, :as => :mongo_mapper_has_one_target_testable
|
22
|
+
require_mongoid { t_has_one :mongoid_has_one_target, :as => :mongoid_has_one_target_testable }
|
23
|
+
t_has_one :sequel_has_one_target, :as => :sequel_has_one_target_testable
|
24
|
+
|
25
|
+
t_has_many :active_record_has_many_targets, :as => :active_record_has_many_target_testable
|
26
|
+
t_has_many :couch_rest_has_many_targets, :as => :couch_rest_has_many_target_testable
|
27
|
+
t_has_many :data_mapper_has_many_targets, :as => :data_mapper_has_many_target_testable
|
28
|
+
t_has_many :mongo_mapper_has_many_targets, :as => :mongo_mapper_has_many_target_testable
|
29
|
+
require_mongoid { t_has_many :mongoid_has_many_targets, :as => :mongoid_has_many_target_testable }
|
30
|
+
t_has_many :sequel_has_many_targets, :as => :sequel_has_many_target_testable
|
17
31
|
end
|
@@ -9,6 +9,7 @@ ActiveRecord::Schema.define :version => 0 do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
create_table :active_record_engines, :force => true do |t|
|
12
|
+
t.string :prop
|
12
13
|
t.integer :car_id
|
13
14
|
end
|
14
15
|
|
@@ -21,6 +22,16 @@ ActiveRecord::Schema.define :version => 0 do
|
|
21
22
|
t.string :mongo_mapper_wheel_id
|
22
23
|
end
|
23
24
|
|
25
|
+
create_table :active_record_engines_diagnosables, :force => true do |t|
|
26
|
+
t.integer :active_record_engine_id
|
27
|
+
t.string :diagnosable_id
|
28
|
+
end
|
29
|
+
|
30
|
+
create_table :active_record_cars_mongo_mapper_windows, :force => true do |t|
|
31
|
+
t.integer :active_record_car_id
|
32
|
+
t.string :mongo_mapper_window_id
|
33
|
+
end
|
34
|
+
|
24
35
|
create_table :active_record_cars_couch_rest_doors, :force => true do |t|
|
25
36
|
t.integer :active_record_car_id
|
26
37
|
t.string :couch_rest_door_id
|
@@ -36,29 +47,56 @@ ActiveRecord::Schema.define :version => 0 do
|
|
36
47
|
end
|
37
48
|
|
38
49
|
create_table :active_record_objects, :force => true do |t|
|
50
|
+
t.string :prop
|
39
51
|
end
|
40
52
|
|
41
53
|
create_table :active_record_has_one_targets, :force => true do |t|
|
42
|
-
t.
|
54
|
+
t.integer :active_record_object_id
|
43
55
|
t.string :couch_rest_object_id
|
44
|
-
t.
|
56
|
+
t.integer :data_mapper_object_id
|
45
57
|
t.string :mongo_mapper_object_id
|
46
58
|
t.string :mongoid_object_id
|
47
|
-
t.
|
59
|
+
t.integer :sequel_object_id
|
60
|
+
|
61
|
+
t.string :active_record_has_one_target_testable_id
|
62
|
+
t.string :active_record_has_one_target_testable_type
|
63
|
+
t.string :couch_rest_has_one_target_testable_id
|
64
|
+
t.string :couch_rest_has_one_target_testable_type
|
65
|
+
t.string :data_mapper_has_one_target_testable_id
|
66
|
+
t.string :data_mapper_has_one_target_testable_type
|
67
|
+
t.string :mongo_mapper_has_one_target_testable_id
|
68
|
+
t.string :mongo_mapper_has_one_target_testable_type
|
69
|
+
t.string :mongoid_has_one_target_testable_id
|
70
|
+
t.string :mongoid_has_one_target_testable_type
|
71
|
+
t.string :sequel_has_one_target_testable_id
|
72
|
+
t.string :sequel_has_one_target_testable_type
|
48
73
|
end
|
49
74
|
|
50
75
|
create_table :active_record_has_many_targets, :force => true do |t|
|
51
76
|
t.integer :active_record_object_id
|
52
77
|
t.string :couch_rest_object_id
|
53
|
-
t.
|
78
|
+
t.integer :data_mapper_object_id
|
54
79
|
t.string :mongo_mapper_object_id
|
55
80
|
t.string :mongoid_object_id
|
56
|
-
t.
|
81
|
+
t.integer :sequel_object_id
|
82
|
+
|
83
|
+
t.string :active_record_has_many_target_testable_id
|
84
|
+
t.string :active_record_has_many_target_testable_type
|
85
|
+
t.string :couch_rest_has_many_target_testable_id
|
86
|
+
t.string :couch_rest_has_many_target_testable_type
|
87
|
+
t.string :data_mapper_has_many_target_testable_id
|
88
|
+
t.string :data_mapper_has_many_target_testable_type
|
89
|
+
t.string :mongo_mapper_has_many_target_testable_id
|
90
|
+
t.string :mongo_mapper_has_many_target_testable_type
|
91
|
+
t.string :mongoid_has_many_target_testable_id
|
92
|
+
t.string :mongoid_has_many_target_testable_type
|
93
|
+
t.string :sequel_has_many_target_testable_id
|
94
|
+
t.string :sequel_has_many_target_testable_type
|
57
95
|
end
|
58
96
|
|
59
97
|
create_table :active_record_has_many_targets_active_record_objects, :force => true do |t|
|
60
98
|
t.integer :active_record_object_id
|
61
|
-
t.
|
99
|
+
t.integer :active_record_has_many_target_id
|
62
100
|
end
|
63
101
|
|
64
102
|
create_table :active_record_objects_mongo_mapper_has_many_targets, :force => true do |t|
|
@@ -73,7 +111,7 @@ ActiveRecord::Schema.define :version => 0 do
|
|
73
111
|
|
74
112
|
create_table :active_record_objects_data_mapper_has_many_targets, :force => true do |t|
|
75
113
|
t.integer :active_record_object_id
|
76
|
-
t.
|
114
|
+
t.integer :data_mapper_has_many_target_id
|
77
115
|
end
|
78
116
|
|
79
117
|
create_table :active_record_objects_mongoid_has_many_targets, :force => true do |t|
|
@@ -83,6 +121,47 @@ ActiveRecord::Schema.define :version => 0 do
|
|
83
121
|
|
84
122
|
create_table :active_record_objects_sequel_has_many_targets, :force => true do |t|
|
85
123
|
t.integer :active_record_object_id
|
86
|
-
t.
|
124
|
+
t.integer :sequel_has_many_target_id
|
125
|
+
end
|
126
|
+
|
127
|
+
create_table :active_record_objects_mongo_mapper_autosave_true_has_many_targets, :force => true do |t|
|
128
|
+
t.integer :active_record_object_id
|
129
|
+
t.integer :mongo_mapper_autosave_true_has_many_target_id
|
130
|
+
end
|
131
|
+
|
132
|
+
create_table :active_record_objects_mongo_mapper_autosave_false_has_many_targets, :force => true do |t|
|
133
|
+
t.integer :active_record_object_id
|
134
|
+
t.integer :mongo_mapper_autosave_false_has_many_target_id
|
87
135
|
end
|
136
|
+
|
137
|
+
create_table :active_record_has_many_target_testables_active_record_objects, :force => true do |t|
|
138
|
+
t.integer :active_record_object_id
|
139
|
+
t.integer :active_record_has_many_target_testable_id
|
140
|
+
end
|
141
|
+
|
142
|
+
create_table :active_record_objects_mongo_mapper_has_many_target_testables, :force => true do |t|
|
143
|
+
t.integer :active_record_object_id
|
144
|
+
t.string :mongo_mapper_has_many_target_testable_id
|
145
|
+
end
|
146
|
+
|
147
|
+
create_table :active_record_objects_data_mapper_has_many_target_testables, :force => true do |t|
|
148
|
+
t.integer :active_record_object_id
|
149
|
+
t.string :data_mapper_has_many_target_testable_id
|
150
|
+
end
|
151
|
+
|
152
|
+
create_table :active_record_objects_couch_rest_has_many_target_testables, :force => true do |t|
|
153
|
+
t.integer :active_record_object_id
|
154
|
+
t.string :couch_rest_has_many_target_testable_id
|
155
|
+
end
|
156
|
+
|
157
|
+
create_table :active_record_objects_sequel_has_many_target_testables, :force => true do |t|
|
158
|
+
t.integer :active_record_object_id
|
159
|
+
t.string :sequel_has_many_target_testable_id
|
160
|
+
end
|
161
|
+
|
162
|
+
create_table :active_record_objects_mongoid_has_many_target_testables, :force => true do |t|
|
163
|
+
t.integer :active_record_object_id
|
164
|
+
t.string :mongoid_has_many_target_testable_id
|
165
|
+
end
|
166
|
+
|
88
167
|
end
|