active_shard 0.1.0 → 0.1.1
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/CHANGELOG +4 -1
- data/README.md +3 -2
- data/lib/active_shard/active_record/railtie.rb +19 -19
- data/lib/active_shard/version.rb +1 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -202,6 +202,7 @@ To better understand what's happening here, see ActiveShard::Scope.
|
|
202
202
|
Migrations for each schema must reside in a directory under db/migrate that corresponds to the schema name.
|
203
203
|
|
204
204
|
Example:
|
205
|
+
|
205
206
|
db/migrate/main
|
206
207
|
20110810103523_create_users_table.rb
|
207
208
|
db/migrate/directories
|
@@ -237,8 +238,8 @@ There are several, but Octopus (ar-octopus) is the most popular.
|
|
237
238
|
|
238
239
|
## Authors ##
|
239
240
|
|
240
|
-
Brasten Sager ( brasten@dashwire.com )
|
241
|
-
Matt Baker ( matt@dashwire.com )
|
241
|
+
- Brasten Sager ( brasten@dashwire.com )
|
242
|
+
- Matt Baker ( matt@dashwire.com )
|
242
243
|
|
243
244
|
## Copyright
|
244
245
|
|
@@ -30,25 +30,25 @@ module ActiveShard
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
ActiveShard.config do |c|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
require 'active_shard/active_record'
|
42
|
-
|
43
|
-
ActiveRecord::Base.send( :include, ActiveShard::ActiveRecord::ShardSupport )
|
44
|
-
|
45
|
-
ActiveRecord::Base.connection_handler =
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
ActiveRecord::Base.schema_name( :main )
|
33
|
+
# ActiveShard.config do |c|
|
34
|
+
# definitions = ActiveShard::ShardDefinition.from_yaml_file( File.expand_path( '../shards.yml', __FILE__ ) )
|
35
|
+
#
|
36
|
+
# definitions[ Rails.env.to_sym ].each do |shard|
|
37
|
+
# c.add_shard( shard )
|
38
|
+
# end
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# require 'active_shard/active_record'
|
42
|
+
#
|
43
|
+
# ActiveRecord::Base.send( :include, ActiveShard::ActiveRecord::ShardSupport )
|
44
|
+
#
|
45
|
+
# ActiveRecord::Base.connection_handler =
|
46
|
+
# ActiveShard::ActiveRecord::ConnectionHandler.new(
|
47
|
+
# ActiveShard.config.shard_definitions,
|
48
|
+
# :shard_lookup => ActiveShard::ShardLookupHandler.new( :scope => ActiveShard.scope, :config => ActiveShard.config )
|
49
|
+
# )
|
50
|
+
#
|
51
|
+
# ActiveRecord::Base.schema_name( :main )
|
52
52
|
|
53
53
|
|
54
54
|
end
|
data/lib/active_shard/version.rb
CHANGED