forked from External/greenlight
make upgrading from 1.0 easier
This commit is contained in:
@ -5,6 +5,13 @@ require 'bigbluebutton_api'
|
||||
class ApplicationController < ActionController::Base
|
||||
include SessionsHelper
|
||||
|
||||
before_action :migration_error?
|
||||
|
||||
# Show an information page when migration fails and there is a version error.
|
||||
def migration_error?
|
||||
render :migration_error unless ENV["DB_MIGRATE_FAILED"].blank?
|
||||
end
|
||||
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
MEETING_NAME_LIMIT = 90
|
||||
|
16
app/views/application/migration_error.html.erb
Normal file
16
app/views/application/migration_error.html.erb
Normal file
@ -0,0 +1,16 @@
|
||||
<div class="page mt-0">
|
||||
<div class="page-content mt-0">
|
||||
<div class="container text-center">
|
||||
<i class="fas fa-database fa-6x mb-4"></i>
|
||||
<h1 class="h3 mb-2">Greenlight encountered a database migration error.<br>This may be because you haven't updated to Greenlight 2.0.</h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7">If you are not an administrator, please contact one.</p>
|
||||
<h1 class="h3 mb-3">We've released a new version of Greenlight, but your database isn't compatible.</h1>
|
||||
<a class="btn btn-success mt-3 mx-3" href="http://docs.bigbluebutton.org/install/greenlight-v2.html#upgrading-from-greenlight-10" target="_blank">
|
||||
<i class="far fa-star mr-2"></i>Show me how to upgrade to 2.0!
|
||||
</a>
|
||||
<a class="btn btn-info mt-3 mx-3 w-20" href="" target="_blank">
|
||||
<i class="far fa-hand-paper mr-2"></i>I'd like to stay using 1.0.
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user