fix for the migration for some linux users, which the AR stubs were not carring over from the migration file to the ShareVisibilityConverter
This commit is contained in:
parent
38ad76d9c7
commit
0edb06eef7
1 changed files with 26 additions and 1 deletions
|
|
@ -1,3 +1,28 @@
|
||||||
|
#we dont have the enviroment, and it is not carring over from the migration
|
||||||
|
unless defined?(Person)
|
||||||
|
class Person < ActiveRecord::Base
|
||||||
|
belongs_to :owner, :class_name => 'User'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
unless defined?(User)
|
||||||
|
class User < ActiveRecord::Base
|
||||||
|
serialize :hidden_shareables, Hash
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
unless defined?(Contact)
|
||||||
|
class Contact < ActiveRecord::Base
|
||||||
|
belongs_to :user
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
unless defined?(ShareVisibility)
|
||||||
|
class ShareVisibility < ActiveRecord::Base
|
||||||
|
belongs_to :contact
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class ShareVisibilityConverter
|
class ShareVisibilityConverter
|
||||||
RECENT = 2 # number of weeks to do in the migration
|
RECENT = 2 # number of weeks to do in the migration
|
||||||
def self.copy_hidden_share_visibilities_to_users(only_recent = false)
|
def self.copy_hidden_share_visibilities_to_users(only_recent = false)
|
||||||
|
|
@ -21,4 +46,4 @@ class ShareVisibilityConverter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue