diff --git a/db/migrate/20150973000001_update_overview3.rb b/db/migrate/20150973000001_update_overview3.rb index c35efdb5a..8d87a0d17 100644 --- a/db/migrate/20150973000001_update_overview3.rb +++ b/db/migrate/20150973000001_update_overview3.rb @@ -1,5 +1,9 @@ class UpdateOverview3 < ActiveRecord::Migration def up + + # return if it's a new setup + return if !Setting.find_by(name: 'system_init_done') + UserInfo.current_user_id = 1 overview_role = Role.where( name: 'Agent' ).first Overview.create_or_update(