Changes between Initial Version and Version 1 of Ticket #24481, comment 2
- Timestamp:
- Mar 15, 2015, 9:23:18 AM (10 years ago)
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 1 Do you mean "sqlmigrate" would output, in sequence, all "alter tables" commands to recreate the final DBs? 2 2 3 3 I'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)"). 4 4 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 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? 6 6 7 7