rails-sqlserver / activerecord-sqlserver-adapter

SQL Server Adapter For Rails
MIT License
974 stars 563 forks source link

Add compatibility_level config #1250

Open slavad opened 1 month ago

slavad commented 1 month ago

Issue

You can't specify compatibility_level in the db config

Expected behavior

You should be able to do this

Actual behavior

If I add compatibility_level: 130 in database.yml, it's ignored, the compatibility level is set to 140 (default for my db version)

How to reproduce

Add compatibility_level: 130 to the db config in database.yml

Details

I forked the repo and added this feature. Is it ok if I create a pull request?

The feature branch was branched off the tag v7.2.1

aidanharan commented 1 month ago

@slavad Why would you change the compatibility level of a database when you connect to it? If it's a once off task then doing it manually would be better.

slavad commented 4 weeks ago

@aidanharan no, the compatibility level would be set during creation.

The compatibility_level setting would work like the collation setting (both in database.yml)

slavad commented 3 weeks ago

@aidanharan check this out https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1254