Feature: JH db migrations
More details: https://gitlab.com/gitlab-jh/gitlab/-/issues/161
Goals
Generator
bundle exec rails g migration create_jh_only
-
Created jh/db/migrate/20210826052352_create_jh_only.rb
Migration
bundle exec rails db:migrate
-
Created jh/db/schema_migrations/20210826052352 -
Updated jh/db/structure.sql
CE/EE upgrade to JH
-
Upgrade from a version before 13.10.0 -
Upgrade from a version after 13.10.0 ⚠ ️
Rails source code reference
https://github.com/rails/rails/blob/6-1-stable/activerecord/lib/active_record/migration.rb#L1217
https://github.com/rails/rails/blob/6-1-stable/railties/lib/rails/engine/configuration.rb#L64-L66
https://github.com/rails/rails/blob/6-1-stable/activerecord/lib/active_record/railtie.rb#L38-L50
https://github.com/rails/rails/blob/6-1-stable/railties/lib/rails/generators/migration.rb#L56-L74
Background Information
由 Qian Zhang (Gary) 编辑于