Modify

Ticket #12 (closed enhancement: wontfix)

Opened 6 years ago

Last modified 4 years ago

Adding columns in the middle of tables with db.add_column

Reported by: anonymous Owned by: andrew
Priority: minor Milestone: 0.4
Component: databaseapi Version: 0.3
Keywords: Cc:

Description

since some of us are picky about column ordering being able to specify column position for new columns would be nice.

Attachments

Change History

comment:1 Changed 6 years ago by andrew

  • Status changed from new to assigned
  • Version set to 0.3
  • Summary changed from column ordering would be cool to Adding columns in the middle of tables with db.add_column
  • Milestone set to 0.4

Column ordering is already available; columns are created in exactly the same order they appear in the db.create_table call.

Do you mean for new columns in existing tables (i.e. db.add_column?) That would be a nice feature, I'll put it on the list.

comment:2 Changed 6 years ago by amccurdy

Do all databases support this? I know MySQL does. Does Postgres? I haven't seen anything in the ALTER COLUMN syntax about it.

comment:3 Changed 6 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to wontfix

You're right Andy, it's not in Postgres, and it's a very uncommon thing to want (since Django always lets you specify columns in an order, and the only place it matters is values_list).

I'm going to say that, if you rely on database-specific features like this, then you should be using db.execute(). It's not going in South, we don't implement non-database-agnostic things in our database-abstraction library.

View

Add a comment

Modify Ticket

Action
as closed
Author


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

 
Note: See TracTickets for help on using tickets.