Modify

Ticket #158 (closed enhancement: invalid)

Opened 5 years ago

Last modified 4 years ago

Rename Tables

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

Description

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.

Attachments

Change History

comment:1 Changed 5 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 4 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 4 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.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.