Ticket #688 (closed defect: duplicate)

Opened 4 years ago

Last modified 4 years ago

schemamigration --add-index creates invisible migrations

Reported by: steve@… Owned by: andrew
Priority: major Milestone: 1.0
Component: commands Version: 0.7.2
Keywords: Cc:


If you create a schemamigration to add an index the migration file name is created with a dot in it. This keeps it from being visible to migrate. If you subsequently rename the migration py file to remove the dot it is a valid python file.

Should probably generate the file w/o the dot. Unless there is a different way to specify the

$  python ./ schemamigration --add-index=Myapp.effective_date myapp
 + Added index for ['effective_date'] on myapp.Myapp
Created You can now apply this migration with: ./ migrate myapp
$  python ./ migrate myapp --list

  (*) 0001_initial

$ ls myapp/migrations/  0001_initial.pyc  __init__.pyc

$ cd myapp/migrations/
/myapp/migrations$ mv
/myapp/migrations$ cd ..
/myapp$ cd ..
$  python ./ migrate myapp --list

  (*) 0001_initial
  ( ) 0002_add_index_Myapp_effective_date


Change History

comment:1 Changed 4 years ago by andrew

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone set to 1.0

Duplicate of #653.


Add a comment

Modify Ticket

as closed

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

Note: See TracTickets for help on using tickets.