Changes between Initial Version and Version 1 of Ticket #24481, comment 2


Ignore:
Timestamp:
Mar 15, 2015, 9:23:18 AM (10 years ago)
Author:
pascal chambon

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24481, comment 2

    initial v1  
    1 Do you mean "sqlmigrate" would output, in sequence, all "alter tables" commands to recreate the final DBs ?
     1Do you mean "sqlmigrate" would output, in sequence, all "alter tables" commands to recreate the final DBs?
    22
    33I've had a look at django\core\management\sql.py, a function check_for_migrations() is called to abort when some models use migrations, but other than that, nothing seems to prevent generation from sql for migration-enabled models. There is even, farther, code which looks explicitely dedicated to migration handling ("for model in router.get_migratable_models(app_config, connection.alias, include_auto_created=True)").
    44
    5 From what I understand, these sql* commands browse '''current''' model objects, and convert them to sql statements, so I guess they shouldn't care about whether these python classes have some "history" behind them. Or am I misunderstanding how all that works ?
     5From what I understand, these sql* commands browse '''current''' model objects, and convert them to sql statements, so I guess they shouldn't care about whether these python classes have some "history" behind them. Or am I misunderstanding how all that works?
    66
    77
Back to Top