Ticket #158 (closed enhancement: invalid)

Opened 7 years ago

Last modified 6 years ago

Rename Tables

Reported by: anonymous Owned by: andrew
Priority: minor Milestone: The Future
Component: commands Version:
Keywords: Cc:


It would be nice if there was a command that allowed for the renaming of tables. I realize that certain databases don't allow this functionality so it would probably have to be implemented by creating the new table, transferring all the data and then deleting the old database, but it would be a nice little feature.

Change History

comment:1 Changed 7 years ago by andrew

  • Status changed from new to closed
  • Resolution set to invalid

I believe you're after db.rename_table in the API, which for some reason I missed off the documentation API overview.

comment:2 Changed 6 years ago by anonymous

I just used db.rename_table ...that migration worked fine, but the next one I created (via --auto) included a db.delete_table command for the old table name.

Should I have manually renamed it also in the big models dict in my renaming migration?

comment:3 Changed 6 years ago by andrew

anonymous: If you manually edited the models dict, then yes, you need to make sure it all matches; auto uses the diff between that big dict and the current models to work out what to do.

Note: See TracTickets for help on using tickets.