Migration from old customized v2 to v3

53 views
Skip to first unread message

James Hartley

unread,
Jul 31, 2024, 3:45:37 AM7/31/24
to bigbluebutton-greenlight
Good Morning all,

Trying to migrate greenlight from a really old V2 version that was customized in the old way with a separate fork. I have managed to get the migration rake tasks installed, and do a git pull, although docker-conpose pull does not work. When i try and run the roles migration, this is the output:

root@bbbgl1:/home/cawadmin# sudo docker exec -it greenlight-v2 bundle exec rake migrations:roles
rake aborted!
NoMethodError: undefined method `green' for main:Object
/usr/src/app/lib/tasks/migrations/migrations.rake:46:in `block (3 levels) in <main>'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:70:in `each'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:70:in `block in find_each'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:238:in `block in in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:222:in `loop'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:222:in `in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:135:in `find_in_batches'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/activerecord-5.2.6/lib/active_record/relation/batches.rb:69:in `find_each'
/usr/src/app/lib/tasks/migrations/migrations.rake:23:in `block (2 levels) in <main>'
/usr/src/app/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => migrations:roles

Seems like i dont have anything loaded for color, and the output is less than helpful.

Anyone been through this, and have some tips?

Thanks
James

James Hartley

unread,
Jul 31, 2024, 6:49:53 AM7/31/24
to bigbluebutton-greenlight
is 
git fetch upstream
git merge upstream/v2

going to cause me a headache?

James Hartley

unread,
Jul 31, 2024, 2:50:05 PM7/31/24
to bigbluebutton-greenlight
that will be a no on that one, how can i resolve this and get up to date code so the migration will work?

root@bbbgl1:~/greenlight# git merge upstream/v2
error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
root@bbbgl1:~/greenlight# git status
On branch custom-changes
Your branch is up to date with 'upstream/v2'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   app/views/main/index.html.erb
        modified:   config/locales/en.yml
        modified:   db/migrate/20190726153012_add_custom_roles.rb
        deleted:    db/migrate/20201214232153_add_last_login_to_users.rb
        deleted:    db/migrate/20210108032132_add_moderator_access_code_to_rooms.rb
        deleted:    db/migrate/20210319160827_add_can_launch_recording_to_permissions.rb
        modified:   docker-compose.yml

Unmerged paths:
  (use "git reset HEAD <file>..." to unstage)
  (use "git add <file>..." to mark resolution)

        both modified:   db/schema.rb

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   config/application.rb
        modified:   docker-compose.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        db.bak/


Reply all
Reply to author
Forward
0 new messages