activerecord-jdbc-alt-adapter 50.3.0-java → 50.3.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e58bddfe5967904c64554ce056adcabdbf2fba8c71e3d572f8dfcff4a03350e
4
- data.tar.gz: afd5c394c18aa7b93fd47bc4df0e20fe262caf56e4f4801de3f39b316aea6b5d
3
+ metadata.gz: 92dac2edfcfed4dc0eb6a9cc29a7b09d1b9353dc8c81f9a83354d8483a29d693
4
+ data.tar.gz: 655f68ee07612be8dde98751a301a73cb000202b177c2caccdd096ad73ddb734
5
5
  SHA512:
6
- metadata.gz: c31d317efe7b21cbb66a04f280f0e1f7c1ae1c2aae2ccad935f44f6b895ecf574327c686e46c8f0322249695948702a083b3725713fe8da6fdf7551620da35e8
7
- data.tar.gz: 9bc2247fa9a90d6cdc49fbc39e90fe51fa1ea81d616ebee22e15fdfa85bb2ae56652afa72780fff6cd25d8d7a037199a4c827e5b9cfc5c69fb59adf95fff59c9
6
+ metadata.gz: 771a171b82db726fc727075a4b84f5c4772565b7005682bda6ea017f1464e7c3ab7d6b933f23943a534aac5e70c72d88df3fd173d417beff5d9325b8f8a10a61
7
+ data.tar.gz: de350c94d7eeda43af9e55eda5db8cc53c6a2ff16607a40c7a27850194c8845edd5f96f58be4b8be4fa30a07709cf023078df1cb584bd1019303d484d12e10a3
data/README.md CHANGED
@@ -11,12 +11,16 @@ use the [original adapter](https://github.com/jruby/activerecord-jdbc-adapter)
11
11
 
12
12
  Add the following to your `Gemfile`:
13
13
 
14
- ```
15
- gem 'activerecord-jdbc-alt-adapter', '~> 50.3.0'
16
-
17
- gem 'jdbc-mssql', '~> 0.6.0'
14
+ ```ruby
15
+ platforms :jruby do
16
+ # Use jdbc as the database for Active Record
17
+ gem 'activerecord-jdbc-alt-adapter', '~> 50.3.1', require: 'arjdbc'
18
+ gem 'jdbc-mssql', '~> 0.6.0'
19
+ end
18
20
  ```
19
21
 
22
+ Or look at the sample rails 5.0 app [wombat](https://github.com/JesseChavez/wombat50)
23
+ and see how is set up.
20
24
 
21
25
  ### Breaking changes
22
26
 
@@ -31,6 +35,16 @@ gem 'jdbc-mssql', '~> 0.6.0'
31
35
 
32
36
  ### Recommendation
33
37
 
38
+ If you have the old sql server `datetime` data type for created_at and
39
+ updated_at, you don't need to be upgraded straightaway to `datetime2`, the old data type
40
+ (`datetime_basic`) will still work fine, just make you add to the time zone
41
+ aware list.
42
+
43
+ ```ruby
44
+ # time zone aware configuration.
45
+ config.active_record.time_zone_aware_types = [:datetime, :datetime_basic]
46
+ ```
47
+
34
48
  In order to avoid deadlocks it is advised to use `SET READ_COMMITTED_SNAPSHOT ON`
35
49
  Make sure to run `ALTER DATABASE your_db SET READ_COMMITTED_SNAPSHOT ON` against
36
50
  your database.
@@ -44,8 +58,9 @@ If you have slow queries on your background jobs and locking queries you can cha
44
58
 
45
59
  database config example (`database.yml`):
46
60
 
61
+
47
62
  ```yml
48
- # SQL Server (2012 or higher recommended)
63
+ # SQL Server (2012 or higher)
49
64
 
50
65
  default: &default
51
66
  adapter: sqlserver
@@ -54,13 +69,28 @@ default: &default
54
69
  development:
55
70
  <<: *default
56
71
  host: localhost
57
- database: jruby_development
58
- username: dev
72
+ database: sam_development
73
+ username: SA
59
74
  password: password
60
75
  transaction_isolation: read_uncommitted
61
76
  lock_timeout: 10000
77
+
78
+ test:
79
+ <<: *default
80
+ host: localhost
81
+ database: sam_test
82
+ username: SA
83
+ password: password
84
+
85
+ production:
86
+ <<: *default
87
+ host: localhost
88
+ database: sam_production
89
+ username:
90
+ password:
62
91
  ```
63
92
 
93
+
64
94
  ### WARNING
65
95
 
66
96
  Keep one eye in the Rails connection pool, we have not thoroughly tested that
Binary file
@@ -1,3 +1,3 @@
1
1
  module ArJdbc
2
- VERSION = '50.3.0'
2
+ VERSION = '50.3.1'
3
3
  end
@@ -424,6 +424,8 @@ public class MSSQLRubyJdbcConnection extends RubyJdbcConnection {
424
424
  protected String mapTypeToString(final IRubyObject type) {
425
425
  final String typeStr = type.asJavaString();
426
426
 
427
+ if (typeStr == "datetime_basic") return "datetime";
428
+
427
429
  if (typeStr == "smalldatetime") return "datetime";
428
430
 
429
431
  return typeStr;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbc-alt-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 50.3.0
4
+ version: 50.3.1
5
5
  platform: java
6
6
  authors:
7
7
  - Nick Sieger, Ola Bini, Karol Bucek and JRuby contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-02 00:00:00.000000000 Z
11
+ date: 2019-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
262
  version: '0'
263
263
  requirements: []
264
264
  rubyforge_project:
265
- rubygems_version: 2.7.9
265
+ rubygems_version: 2.7.6
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: ActiveRecord JDBC adapter, for use within JRuby on Rails and SQL Server