Skip to content

Fix constraints bug #691

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

Merged
merged 1 commit into from
Jun 22, 2019
Merged

Conversation

ahorek
Copy link

@ahorek ahorek commented Mar 20, 2019

activerecord-sqlserver-adapter (5.2.0)
tiny_tds (2.1.2-x64-mingw32)
rails (5.2.2)

rails migration

change_column :projects, :description, :text, :null => true, :default => nil

raises an error TinyTds::Error: The object 'DF_projects_description' is dependent on column 'description'.

there's a bug in activerecord-sqlserver-adapter that executes commands in wrong order

before

ALTER TABLE table REMOVE CONSTRAINT
ALTER TABLE table ADD CONSTRAINT
ALTER TABLE table ALTER COLUMN

after

ALTER TABLE table REMOVE CONSTRAINT
ALTER TABLE table ALTER COLUMN
ALTER TABLE table ADD CONSTRAINT

@ahorek ahorek force-pushed the constrains_bug branch 5 times, most recently from f6a46f6 to fea5966 Compare March 21, 2019 11:55
@wpolicarpo wpolicarpo merged commit 9cfca3d into rails-sqlserver:master Jun 22, 2019
wpolicarpo added a commit that referenced this pull request Jun 24, 2019
@wpolicarpo wpolicarpo changed the title fix constrains bug Fix constraints bug Mar 30, 2020
gupta-kanika-dev pushed a commit to gupta-kanika-dev/activerecord-sqlserver-adapter that referenced this pull request Apr 18, 2022
lavika pushed a commit to lavika/activerecord-sqlserver-adapter that referenced this pull request Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants