Skip to content

create table, index/primary_key breaking #5

Description

@brihogan

If you create a table and then set an index for a row that doesn't exist, the migration will fail. The table will still be in the DB but you will not be able to rollback. If you change the index to a legit name and re-migrate you'll get an error that says that that table is already in use.

I can make the problem work by starting the migration with:
this.drop_table('table_name');

But, it seems like .drop_table should either be part of .create_table or the migrate shouldn't keep the table when an error occurs. The later would probably be ideal.

Thanks again for a great module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions