diff --git a/lib/share_visibility_converter.rb b/lib/share_visibility_converter.rb index c8f6dff30..b8b0e7aa1 100644 --- a/lib/share_visibility_converter.rb +++ b/lib/share_visibility_converter.rb @@ -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 RECENT = 2 # number of weeks to do in the migration def self.copy_hidden_share_visibilities_to_users(only_recent = false) @@ -21,4 +46,4 @@ class ShareVisibilityConverter end end end -end \ No newline at end of file +end