Skip to content

Commit 2574b98

Browse files
committed
Revert "Merge branch '5-2-stable' into 5-1-stable-with-odbc"
This reverts commit f9c4e45, reversing changes made to d3eb0f2.
1 parent f9c4e45 commit 2574b98

39 files changed

+246
-658
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ Gemfile.lock
99
test/profile/output/*
1010
.rvmrc
1111
.rbenv-version
12-
.tool-versions
1312
.idea
1413
coverage/*
1514
.flooignore
16-
.floo
17-
.byebug_history
15+
.floo

.travis.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ services:
44
- docker
55
env:
66
global:
7-
- COMPOSE_FILE: docker-compose.ci.yml
7+
- TINYTDS_VERSION=2.1.0
8+
- ACTIVERECORD_UNITTEST_HOST=localhost
9+
- ACTIVERECORD_UNITTEST_DATASERVER=localhost
10+
rvm:
11+
- 2.2.5
12+
- 2.3.1
13+
- 2.4.0
814
before_install:
9-
- sudo rm /usr/local/bin/docker-compose
10-
- sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
11-
- sudo chmod +x /usr/local/bin/docker-compose
15+
- export PATH=/opt/local/bin:$PATH
16+
- docker info
17+
- sudo ./test/bin/setup.sh
18+
- sudo ./test/bin/install-openssl.sh
19+
- openssl version
20+
- sudo ./test/bin/install-freetds.sh
21+
- tsql -C
1222
install:
13-
- docker-compose build --build-arg TARGET_VERSION=$TARGET_VERSION
23+
- export PATH=/opt/local/bin:$PATH
24+
- gem install bundler
25+
- bundle --version
26+
- bundle install
1427
script:
15-
- docker-compose run ci
16-
matrix:
17-
include:
18-
- name: 2.3.8
19-
env: TARGET_VERSION=2.3.8
20-
- name: 2.4.6
21-
env: TARGET_VERSION=2.4.6
22-
- name: 2.5.5
23-
env: TARGET_VERSION=2.5.5
24-
- name: 2.6.3
25-
env: TARGET_VERSION=2.6.3
28+
- bundle exec rake

BACKERS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Backers
2+
3+
You can join in supporting TinyTDS and the Rails SQL Server Adapter development by [pledging on Patreon](https://www.patreon.com/metaskills)! Backers in the same pledge level appear in the order of pledge date.
4+
5+
### $2000
6+
7+
[It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611218)
8+
9+
10+
### $500
11+
12+
[It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611209)
13+
14+
15+
### $250
16+
17+
[It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611199)
18+
19+
20+
### $100
21+
22+
[It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611196)
23+
24+
25+
### $50+
26+
27+
[It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611186)
28+
29+
30+
### $10+
31+
32+
[It could be you!](https://www.patreon.com/bePatron?c=765225&rid=1611149)

CHANGELOG.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,54 @@
1-
## v5.2.0
1+
## v5.1.6
22

3-
- #686 sql_for_insert set table name in case when pk is not nil
3+
#### Added
44

5-
## v5.2.0.rc2
5+
* Use lock hint when joining table in query.
6+
7+
8+
## v5.1.5
69

710
#### Fixed
811

9-
- #681 change_column_null should not clear other column attributes. Fixes #582.
10-
- #684 Fix explain with array conditions. Fixes #673.
12+
* Memoize `@@version` queries. Fixes #632
13+
1114

12-
## v5.2.0.rc1
15+
## v5.1.4
1316

1417
#### Fixed
1518

16-
- #638 Don't disable referential integrity for the same table twice.
17-
- #646 Make String equality check work for Type::Data values. Fixes #645.
18-
- #671 Fix tinyint columns schema migration. Fixes #670.
19+
* Add case insensitive comparison for better performance with CI collations. Fixes #624
20+
21+
22+
## v5.1.3
23+
24+
#### Fixed
25+
26+
* Use bigint type in sqlserver_type when needed. Fixes #616
27+
28+
29+
## v5.1.2
30+
31+
#### Fixed
32+
33+
* The `fast_string_to_time` method when zone local. Fixes #609 #614 #620
34+
* Patched `Relation#build_count_subquery`. Fixes #613.
35+
* Inserts to tables with triggers using default `OUTPUT INSERTED` style. Fixes #595.
36+
37+
38+
## v5.1.1
39+
40+
#### Fixed
41+
42+
* Use `ActiveSupport.on_load` to hook into ActiveRecord Fixes #588 #598
43+
44+
45+
## v5.1.0
1946

2047
#### Changed
2148

22-
- #642 Added with (nolock) hint to information_schema.views.
49+
* The `drop_table` with force cascade option now mimics in via pure SQL for us.
50+
51+
#### Added
2352

53+
* Support MismatchedForeignKey exception.
2454

25-
Please check [5-1-stable](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/5-1-stable/CHANGELOG.md) for previous changes.

Dockerfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ require 'openssl'
22
source 'https://rubygems.org'
33
gemspec
44

5-
gem 'sqlite3', '~> 1.3.6'
5+
gem 'sqlite3', '< 1.4'
6+
gem 'minitest', '< 5.3.4'
67
gem 'bcrypt'
78
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
89

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,20 @@
77
* [![Dependency Status](https://dependencyci.com/github/rails-sqlserver/activerecord-sqlserver-adapter/badge)](https://dependencyci.com/github/rails-sqlserver/activerecord-sqlserver-adapter) - Dependency Status
88
* [![Gitter chat](https://img.shields.io/badge/%E2%8A%AA%20GITTER%20-JOIN%20CHAT%20%E2%86%92-brightgreen.svg?style=flat)](https://gitter.im/rails-sqlserver/activerecord-sqlserver-adapter) - Community
99

10+
## Supporting TinyTDS/Adapter
11+
12+
Both TinyTDS and the Rails SQL Server Adapter are MIT-licensed open source projects. Its ongoing development is made possible thanks to the support by these awesome [backers](https://github.com/rails-sqlserver/tiny_tds/blob/master/BACKERS.md). If you'd like to join them, check out our [Patreon Campaign](https://www.patreon.com/metaskills).
13+
14+
1015
## About The Adapter
1116

12-
The SQL Server adapter for ActiveRecord v5.2 using SQL Server 2012 or higher.
17+
The SQL Server adapter for ActiveRecord v5.1 using SQL Server 2012 or higher.
1318

14-
Interested in older versions? We follow a rational versioning policy that tracks Rails. That means that our 5.1.x version of the adapter is only for the latest 5.1 version of Rails. If you need the adapter for SQL Server 2008 or 2005, you are still in the right spot. Just install the latest 3.2.x to 4.1.x version of the adapter that matches your Rails version. We also have stable branches for each major/minor release of ActiveRecord.
19+
Interested in older versions? We follow a rational versioning policy that tracks Rails. That means that our 5.0.x version of the adapter is only for the latest 5.0 version of Rails. If you need the adapter for SQL Server 2008 or 2005, you are still in the right spot. Just install the latest 3.2.x to 4.1.x version of the adapter that matches your Rails version. We also have stable branches for each major/minor release of ActiveRecord.
1520

1621
#### Native Data Type Support
1722

18-
We support every data type supported by FreeTDS. All simplified Rails types in migrations will coorespond to a matching SQL Server national (unicode) data type. Always check the `initialize_native_database_types` [(here)](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/master/lib/active_record/connection_adapters/sqlserver/schema_statements.rb) for an updated list.
23+
We support every data type supported by FreeTDS. All simplified Rails types in migrations will coorespond to a matching SQL Server national (unicode) data type. Always check the `initialize_native_database_types` [(here)](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/blob/master/lib/active_record/connection_adapters/sqlserver/schema_statements.rb#L243) for an updated list.
1924

2025
The following types (date, datetime2, datetimeoffset, time) all require TDS version 7.3 with TinyTDS. We recommend using FreeTDS 1.0 or higher which default to using `TDSVER` to "7.3". The adapter also sets TinyTDS's `tds_version` to this as well if non is specified.
2126

@@ -131,7 +136,7 @@ gem 'activerecord-sqlserver-adapter'
131136

132137
## Contributing
133138

134-
If you would like to contribute a feature or bugfix, thanks! To make sure your fix/feature has a high chance of being added, please read the following guidelines. First, ask on the Gitter, or post a ticket on github issues. Second, make sure there are tests! We will not accept any patch that is not tested. Please read the [`RUNNING_UNIT_TESTS`](RUNNING_UNIT_TESTS.md) file for the details of how to run the unit tests.
139+
If you would like to contribute a feature or bugfix, thanks! To make sure your fix/feature has a high chance of being added, please read the following guidelines. First, ask on the Gitter, or post a ticket on github issues. Second, make sure there are tests! We will not accept any patch that is not tested. Please read the `RUNNING_UNIT_TESTS` file for the details of how to run the unit tests.
135140

136141
* Github: http://github.com/rails-sqlserver/activerecord-sqlserver-adapter
137142
* Gitter: https://gitter.im/rails-sqlserver/activerecord-sqlserver-adapter

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.0
1+
5.1.6

activerecord-sqlserver-adapter.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ Gem::Specification.new do |spec|
1616
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
1717
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1818
spec.require_paths = ['lib']
19-
spec.add_dependency 'activerecord', '~> 5.2.0'
19+
spec.add_dependency 'activerecord', '~> 5.1.0'
2020
spec.add_dependency 'ruby-odbc'
2121
end

circle.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ dependencies:
1818
- openssl version
1919
- sudo ./test/bin/install-freetds.sh
2020
- tsql -C
21-
- rvm-exec 2.3.8 bundle install
22-
- rvm-exec 2.4.5 bundle install
23-
- rvm-exec 2.5.3 bundle install
24-
- rvm-exec 2.6.0 bundle install
21+
- rvm-exec 2.2.5 bundle install
22+
- rvm-exec 2.3.1 bundle install
23+
- rvm-exec 2.4.0 bundle install
2524

2625
database:
2726
override:
@@ -32,7 +31,6 @@ database:
3231

3332
test:
3433
override:
35-
- rvm-exec 2.3.8 bundle exec rake test
36-
- rvm-exec 2.4.5 bundle exec rake test
37-
- rvm-exec 2.5.3 bundle exec rake test
38-
- rvm-exec 2.6.0 bundle exec rake test
34+
- rvm-exec 2.2.5 bundle exec rake test
35+
- rvm-exec 2.3.1 bundle exec rake test
36+
- rvm-exec 2.4.0 bundle exec rake test

0 commit comments

Comments
 (0)