Skip to content

Commit

Permalink
Bumping version to beta 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Pairing Workstation Calculon committed Aug 30, 2010
1 parent f38e3ef commit fd40592
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 50 deletions.
2 changes: 1 addition & 1 deletion lib/mongoid/version.rb
@@ -1,4 +1,4 @@
# encoding: utf-8
module Mongoid #:nodoc
VERSION = "2.0.0.beta.16"
VERSION = "2.0.0.beta.17"
end
49 changes: 0 additions & 49 deletions mongoid.gemspec
Expand Up @@ -31,53 +31,4 @@ Gem::Specification.new do |s|

s.files = Dir.glob("lib/**/*") + %w(MIT_LICENSE README.rdoc)
s.require_path = 'lib'

s.post_install_message = <<-POST_INSTALL_MESSAGE
_________________________________
|:::::::::::::::::::::::::::::::::| "I find your lack of faith disturbing."
|:::::::::::::;;::::::::::::::::::|
|:::::::::::'~||~~~``:::::::::::::| Mongoid 2 introduces
|::::::::' .': o`:::::::::::| a different way of defining how
|:::::::' oo | |o o ::::::::::| ids are stored on documents, as
|::::::: 8 .'.' 8 o :::::::::| well as how foreign key fields
|::::::: 8 | | 8 :::::::::| and indexes are stored.
|::::::: _._| |_,...8 :::::::::|
|::::::'~--. .--. `. `::::::::| If you were using String
|:::::' =8 ~ \\ o ::::::::| representations of BSON::ObjectIDs
|::::' 8._ 88. \\ o::::::::| as your document ids, all of your
|:::' __. ,.ooo~~. \\ o`::::::| documents will now need to tell
|::: . -. 88`78o/: \\ `:::::| Mongoid to use Strings like so:
|::' /. o o \\ :: \\88`::::|
|:; o|| 8 8 |d. `8 `:::| class User
|:. - ^ ^ -' `-`::| include Mongoid::Document
|::. .:::| identity :type => String
|:::::..... ::' ``::| end
|::::::::-'`- 88 `|
|:::::-'. - :: | All ids will default to
|:-~. . . : | BSON:ObjectIDs from now on, and
| .. . ..: o:8 88o | Config#use_object_ids has been
|. . ::: 8:P d888. . . | removed.
|. . :88 88 888' . . |
| o8 d88P . 88 ' d88P .. | Foreign key fields for relational
| 88P 888 d8P ' 888 | associations no longer index by
| 8 d88P.'d:8 .- dP~ o8 | default - you will need to pass
| 888 888 d~ o888 LS | :index => true to the association
|_________________________________| definition to have the field indexed
or create the index manually, which is the preferred method. Note that
if you were using String ids and now want to use object ids instead you
will have to migrate your database manually - Mongoid cannot perform
this for you automatically. If you were using custom composite keys,
these will need to be defined as Strings since they cannot be converted.
You can run a rake task to convert all your string object ids to ObjectID (thanks to Kyle Banker):
rake db:mongoid:objectid_convert
Your old collections will be backed up to their original names appended with "_old".
If you verify your site is still working good with the ObjectIDs, you can clean them up using:
rake db:mongoid:cleanup_old_collections
POST_INSTALL_MESSAGE
end

0 comments on commit fd40592

Please sign in to comment.