Opened 2 weeks ago

Closed 2 weeks ago

#35963 closed New feature (duplicate)

Add option to `makemigrations` to skip checking consistent history

Reported by: Curtis Maloney Owned by:
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Whilst trying to set up a CI pipeline, I've run into the issue that makemigrations --cheeck still tries to connect to the database.

This is a problem because my CI pipeline doesn't have a DB to connect to.

I would like the option to cheaply check within my CI pipeline that there aren't any obviously forgotten migrations; and "cheaply" here means "without spending the time + bandwidth to stand up a DB service".

Change History (2)

comment:1 by David Sanders, 2 weeks ago

Normally feature requests have to go through the forum, but I tend to think we should accept this:

  • I doubt the consistency check is useful in a CI context
  • Setting up a DB in CI is not always an option if you have no control over CI
  • It appears that skipping the consistency check is all that's required to get this to work (I did a basic test & confirmation)

Thoughts Sarah/Natalia/anyone else?

Edit: I guess the thing that would require discussing is: whether --check behaviour is updated or whether there'd be a new option… ?

Last edited 2 weeks ago by David Sanders (previous) (diff)

comment:2 by Natalia Bidart, 2 weeks ago

Resolution: duplicate
Status: newclosed
Type: UncategorizedNew feature
Version: 5.1dev

Hello Curtis and David, thank you for your proposal and extra rationale. This feels like a duplicate of #33421 which in turn is an "almost" duplicate of #31504.

From looking at the code, the consistency check is skipped if the DB is not available. I'll close as dupe, but please feel free to add further rationale on either:

  1. how this is different from the linked tickets, or
  2. whether the solution provided in #31504 is not working for any reason.
Note: See TracTickets for help on using tickets.
Back to Top