Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter table remove column migration removes primary key #38

Open
pasibonfire opened this issue Apr 20, 2018 · 0 comments
Open

Alter table remove column migration removes primary key #38

pasibonfire opened this issue Apr 20, 2018 · 0 comments
Labels

Comments

@pasibonfire
Copy link

Expected Behavior

Removing a column should remove only the column.
If the removed column is primary key, only then the constraint should be deleted.

Current Behavior

Migration that removes a column (or rollback for add column) removes the primary key constraint from the table.

Possible Solution

Adding primary_key: false doesn't remove the constraint. If this is expected behaviour, there is no documentation about it.

Steps to Reproduce (for bugs)

  1. Clone https://github.com/pasibonfire/mssql_ecto.git
  2. Checkout branch fix_remove_column
  3. Run docker-compose build
  4. Run docker-compose run mssql_ecto mix test

Context

Your Environment

@jbachhardie jbachhardie added the bug label May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants