Skip to content

Use migration class for create table template

Andreas Brandl requested to merge ab/migration-template into master

What does this MR do and why?

Adjust the template for generating "create table migrations" to use Gitlab::Database::Migration[1.0] as a superclass instead of ActiveRecord::Migration[6.1].

See !68986 (comment 679091141)

What is not covered here is model scaffolding, e.g. rails generate model Product name:string description:text would still use the original AR template.

How to set up and validate locally

rails g migration CreateFooTable foo:string

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Andreas Brandl

Merge request reports