Skip to content

Create migration with transaction mode #367

Open

Description

@DisboardTetta

Proposed new feature or change

Hi, I’ve come across the following issue:

#119 - Wrap applying of migrations in a transaction

However, I was surprised to find that when I tried using a flag to create a migration, I encountered an error. Upon checking the valid arguments:

migrate:create [-c|--command COMMAND] [-f|--fields FIELDS] [--table-comment TABLE-COMMENT] [--and AND] [--path PATH] [-ns|--namespace NAMESPACE] [--db DB] [--] <name>

I couldn't find any flag to specify that the migration should be created with a transaction. Furthermore, the documentation lacks information on how to create a transactional migration other than by specifying the interface.

This raises a few questions:

  1. What if most of the migrations in my projects are transactional? How do I specify the default behavior whether to generate migrations as transactional or not?

  2. What if I want to decide whether a migration is transactional at the time of creation for example, by passing a --no-transaction or --transaction flag?

Activity

  1. self-assigned this
    on Oct 14, 2026
  2. samdark commented on Oct 14, 2026

    @samdark
    Member

    Valid enhancement request 👍

  3. samdark commented on Oct 14, 2026

    @samdark
    Member

    @DisboardTetta would you please check the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions