-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
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)
- Clone https://github.com/pasibonfire/mssql_ecto.git
- Checkout branch
fix_remove_column - Run
docker-compose build - Run
docker-compose run mssql_ecto mix test
Context
Your Environment
- MssqlEcto version: 1.1.0
- Ecto version: 2.2.8
- Elixir version: 1.5.3
- Erlang version: 20
- Microsoft SQL Server version: microsoft/mssql-server-linux:2017-CU6
- Operating System and version: macOS High Sierra 10.13.4
- Link to your project: https://github.com/pasibonfire/mssql_ecto/tree/fix_remove_column