diff --git a/config/application.rb b/config/application.rb index e41dc316bb..2e7eccae48 100644 --- a/config/application.rb +++ b/config/application.rb @@ -73,6 +73,29 @@ end require File.dirname(__FILE__) + '/../lib/open_project/configuration' +env = ENV['RAILS_ENV'] || 'production' +db_config = ActiveRecord::Base.configurations[env] || {} +db_adapter = db_config['adapter'] +if db_adapter&.start_with? 'mysql' + warn <<~ERROR + ======= INCOMPATIBLE DATABASE DETECTED ======= + Your database is set up for use with a MySQL or MySQL-compatible variant. + This installation of OpenProject 10.0. no longer supports these variants. + + The following guides provide extensive documentation for migrating + your installation to a PostgreSQL database: + + https://www.openproject.org/migration-guides/ + + This process is mostly automated so you can continue using your + OpenProject installation within a few minutes! + + ============================================== + ERROR + + Kernel.exit 1 +end + module OpenProject class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. diff --git a/config/initializers/01-mysql-error.rb b/config/initializers/01-mysql-error.rb deleted file mode 100644 index 5989461439..0000000000 --- a/config/initializers/01-mysql-error.rb +++ /dev/null @@ -1,20 +0,0 @@ -db_adapter = ActiveRecord::Base.configurations[Rails.env]['adapter'] -if db_adapter.start_with? 'mysql' - warn <<~ERROR - ======= INCOMPATIBLE DATABASE DETECTED ======= - Your database is set up for use with a MySQL or MySQL-compatible variant. - This installation of OpenProject 10.0. no longer supports these variants. - - The following guides provide extensive documentation for migrating - your installation to a PostgreSQL database: - - https://www.openproject.org/migration-guides/ - - This process is mostly automated so you can continue using your - OpenProject installation within a few minutes! - - ============================================== - ERROR - - Kernel.exit 1 -end diff --git a/frontend/src/app/modules/grids/widgets/header/header.component.html b/frontend/src/app/modules/grids/widgets/header/header.component.html index b0cee2c169..3d14e7c409 100644 --- a/frontend/src/app/modules/grids/widgets/header/header.component.html +++ b/frontend/src/app/modules/grids/widgets/header/header.component.html @@ -1,6 +1,6 @@
<%= t('homescreen.blocks.upsale.description') %>
+ ++ <%= t('homescreen.blocks.upsale.become_hero') %> <%= t('homescreen.blocks.upsale.you_contribute') %> +
+ <%= link_to( "#{OpenProject::Static::Links.links[:upsale][:href]}/?utm_source=unknown&utm_medium=community-edition&utm_campaign=enterprise-openid-connect", + { class: 'button -alt-highlight', + aria: {label: t('admin.enterprise.order')}, + title: t('admin.enterprise.order')}) do %> + <%= op_icon('button--icon icon-add') %> + + <% end %> +