Repository navigation
fix(appconnect): Redirect app_id to app_id_str column - #40325
Conversation
wedamija
left a comment
There was a problem hiding this comment.
You'll need to generate a migration for this step. Django basically gets confused here because as far as it can tell, you:
- Deleted
app_id_str - Changed the type of
app_id
Since this pr doesn't make any actual database changes, what you can do is generate the migration, then take the operations it generates and include them in the state_operations of a SeparateDatabaseAndState operation. This allows us to update django's internal migration state, but doesn't result in any actual database operations. There should be a few examples of using SeparateDatabaseAndState in other migrations.
wedamija
left a comment
There was a problem hiding this comment.
I just realised - since you're also removing app_id you should mark that column as nullable in either this or a previous migration.
3ceb3ac to
15780e0
Compare
|
This PR has a migration; here is the generated SQL for --
-- Custom state/database change combination
-- |
This is step 4 in the effort to change the type of
AppConnectBuild.app_idfrom an integer to a string.It effectively removes the old
app_idfield and renames the newapp_id_strfield toapp_id.Depends on #40322.