Commit a07c943bfe29184e4c0456168a3dfbf1c6db400b
1 parent
99752a49
Exists in
master
and in
1 other branch
To legacy purpose we need App _id to be string
revert from [039744a1bb25e6b9ed1bd287554f039ebdc2df60]
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
app/models/app.rb
@@ -15,6 +15,14 @@ class App | @@ -15,6 +15,14 @@ class App | ||
15 | field :notify_on_deploys, :type => Boolean, :default => false | 15 | field :notify_on_deploys, :type => Boolean, :default => false |
16 | field :email_at_notices, :type => Array, :default => Errbit::Config.email_at_notices | 16 | field :email_at_notices, :type => Array, :default => Errbit::Config.email_at_notices |
17 | 17 | ||
18 | + # Some legacy apps may have string as key instead of BSON::ObjectID | ||
19 | + # identity :type => String | ||
20 | + field :_id, | ||
21 | + type: String, | ||
22 | + pre_processed: true, | ||
23 | + default: ->{ Moped::BSON::ObjectId.new.to_s } | ||
24 | + | ||
25 | + | ||
18 | embeds_many :watchers | 26 | embeds_many :watchers |
19 | embeds_many :deploys | 27 | embeds_many :deploys |
20 | embeds_one :issue_tracker | 28 | embeds_one :issue_tracker |