ibm_db 0.7.5 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/test/adapter_test.rb CHANGED
@@ -7,6 +7,9 @@ class AdapterTest < Test::Unit::TestCase
7
7
 
8
8
  if current_adapter?(:IBM_DBAdapter)
9
9
  def test_a_connection_attributes
10
+ if @connection.servertype.class.name.include?('::IBM_IDS')
11
+ return
12
+ end
10
13
  if @connection.respond_to?(:schema)
11
14
  previous_schema = ActiveRecord::Base.connection.schema
12
15
  ActiveRecord::Base.connection.schema = 'SYSCAT'
@@ -0,0 +1,32 @@
1
+ DROP TABLE accounts;
2
+ DROP TABLE funny_jokes;
3
+ DROP TABLE companies;
4
+ DROP TABLE topics;
5
+ DROP TABLE developers;
6
+ DROP TABLE projects;
7
+ DROP TABLE developers_projects;
8
+ DROP TABLE orders;
9
+ DROP TABLE customers;
10
+ DROP TABLE movies;
11
+ DROP TABLE subscribers;
12
+ DROP TABLE booleantests;
13
+ DROP TABLE auto_id_tests;
14
+ DROP TABLE entrants;
15
+ DROP TABLE colnametests;
16
+ DROP TABLE mixins;
17
+ DROP TABLE people;
18
+ DROP TABLE readers;
19
+ DROP TABLE binaries;
20
+ DROP TABLE computers;
21
+ DROP TABLE posts;
22
+ DROP TABLE comments;
23
+ DROP TABLE authors;
24
+ DROP TABLE tasks;
25
+ DROP TABLE categories;
26
+ DROP TABLE categories_posts;
27
+ DROP TABLE fk_test_has_pk;
28
+ DROP TABLE fk_test_has_fk;
29
+ DROP TABLE keyboards;
30
+ DROP TABLE legacy_things;
31
+ DROP TABLE numeric_data;
32
+ DROP TABLE mixed_case_monkeys;
@@ -0,0 +1,234 @@
1
+ CREATE TABLE accounts (
2
+ id SERIAL(100),
3
+ firm_id INT DEFAULT NULL,
4
+ credit_limit INT DEFAULT NULL,
5
+ PRIMARY KEY (id)
6
+ );
7
+
8
+ CREATE TABLE funny_jokes (
9
+ id SERIAL(100),
10
+ name VARCHAR(50) DEFAULT NULL,
11
+ PRIMARY KEY (id)
12
+ );
13
+
14
+ CREATE TABLE companies (
15
+ id SERIAL(100),
16
+ type VARCHAR(50) DEFAULT NULL,
17
+ ruby_type VARCHAR(50) DEFAULT NULL,
18
+ firm_id INT DEFAULT NULL,
19
+ name VARCHAR(50) DEFAULT NULL,
20
+ client_of INT DEFAULT NULL,
21
+ rating INT DEFAULT 1,
22
+ PRIMARY KEY (id)
23
+ );
24
+
25
+ CREATE TABLE topics (
26
+ id SERIAL(100),
27
+ title VARCHAR(255) DEFAULT NULL,
28
+ author_name VARCHAR(255) DEFAULT NULL,
29
+ author_email_address VARCHAR(255) DEFAULT NULL,
30
+ written_on DATETIME YEAR TO FRACTION(5) DEFAULT NULL,
31
+ bonus_time DATETIME YEAR TO FRACTION(5) DEFAULT NULL,
32
+ --bonus_time DATETIME HOUR TO SECOND DEFAULT NULL,
33
+ last_read DATE DEFAULT NULL,
34
+ content CHAR(3000),
35
+ approved SMALLINT DEFAULT 1,
36
+ replies_count INT DEFAULT 0,
37
+ parent_id INT DEFAULT NULL,
38
+ type VARCHAR(50) DEFAULT NULL,
39
+ PRIMARY KEY (id)
40
+ );
41
+
42
+ CREATE TABLE developers (
43
+ id SERIAL(100),
44
+ name VARCHAR(100) DEFAULT NULL,
45
+ salary INT DEFAULT 70000,
46
+ created_at DATETIME YEAR TO FRACTION(5) DEFAULT NULL,
47
+ updated_at DATETIME YEAR TO FRACTION(5) DEFAULT NULL,
48
+ PRIMARY KEY (id)
49
+ );
50
+
51
+ CREATE TABLE projects (
52
+ id SERIAL(100),
53
+ name VARCHAR(100) DEFAULT NULL,
54
+ type VARCHAR(255) DEFAULT NULL,
55
+ PRIMARY KEY (id)
56
+ );
57
+
58
+ CREATE TABLE developers_projects (
59
+ developer_id INT NOT NULL,
60
+ project_id INT NOT NULL,
61
+ joined_on DATE DEFAULT NULL,
62
+ access_level SMALLINT DEFAULT 1
63
+ );
64
+
65
+ CREATE TABLE orders (
66
+ id SERIAL(100),
67
+ name VARCHAR(100) DEFAULT NULL,
68
+ billing_customer_id INT DEFAULT NULL,
69
+ shipping_customer_id INT DEFAULT NULL,
70
+ PRIMARY KEY (id)
71
+ );
72
+
73
+ CREATE TABLE customers (
74
+ id SERIAL(100),
75
+ name VARCHAR(100) DEFAULT NULL,
76
+ balance INT DEFAULT 0,
77
+ address_street VARCHAR(100) DEFAULT NULL,
78
+ address_city VARCHAR(100) DEFAULT NULL,
79
+ address_country VARCHAR(100) DEFAULT NULL,
80
+ gps_location VARCHAR(100) DEFAULT NULL,
81
+ PRIMARY KEY (id)
82
+ );
83
+
84
+ CREATE TABLE movies (
85
+ movieid SERIAL(100),
86
+ name VARCHAR(100) DEFAULT NULL,
87
+ PRIMARY KEY (movieid)
88
+ );
89
+
90
+ CREATE TABLE subscribers (
91
+ nick VARCHAR(100) NOT NULL,
92
+ name VARCHAR(100) DEFAULT NULL,
93
+ PRIMARY KEY (nick)
94
+ );
95
+
96
+ CREATE TABLE booleantests (
97
+ id SERIAL(100),
98
+ value INT DEFAULT NULL,
99
+ PRIMARY KEY (id)
100
+ );
101
+
102
+ CREATE TABLE auto_id_tests (
103
+ auto_id SERIAL(100),
104
+ value INT DEFAULT NULL,
105
+ PRIMARY KEY (auto_id)
106
+ );
107
+
108
+ CREATE TABLE entrants (
109
+ id INT NOT NULL PRIMARY KEY,
110
+ name VARCHAR(255) NOT NULL,
111
+ course_id INT NOT NULL
112
+ );
113
+
114
+ CREATE TABLE colnametests (
115
+ id SERIAL(100),
116
+ references INT NOT NULL,
117
+ PRIMARY KEY (id)
118
+ );
119
+
120
+ CREATE TABLE mixins (
121
+ id SERIAL(100),
122
+ parent_id INT DEFAULT NULL,
123
+ pos INT DEFAULT NULL,
124
+ created_at DATETIME YEAR TO FRACTION(5) DEFAULT NULL,
125
+ updated_at DATETIME YEAR TO FRACTION(5) DEFAULT NULL,
126
+ lft INT DEFAULT NULL,
127
+ rgt INT DEFAULT NULL,
128
+ root_id INT DEFAULT NULL,
129
+ type VARCHAR(40) DEFAULT NULL,
130
+ PRIMARY KEY (id)
131
+ );
132
+
133
+ CREATE TABLE people (
134
+ id SERIAL(100),
135
+ first_name VARCHAR(40) NOT NULL,
136
+ lock_version INT DEFAULT 0,
137
+ PRIMARY KEY (id)
138
+ );
139
+
140
+ CREATE TABLE readers (
141
+ id SERIAL(100),
142
+ post_id INT NOT NULL,
143
+ person_id INT NOT NULL,
144
+ PRIMARY KEY (id)
145
+ );
146
+
147
+ CREATE TABLE binaries (
148
+ id SERIAL(100),
149
+ data BLOB(5000000),
150
+ PRIMARY KEY (id)
151
+ );
152
+
153
+ CREATE TABLE computers (
154
+ id SERIAL(100),
155
+ developer INT NOT NULL,
156
+ extendedWarranty INT NOT NULL
157
+ );
158
+
159
+ CREATE TABLE posts (
160
+ id SERIAL(100),
161
+ author_id INT DEFAULT NULL,
162
+ title VARCHAR(255) DEFAULT NULL,
163
+ type VARCHAR(255) DEFAULT NULL,
164
+ body CHAR(3000) DEFAULT NULL
165
+ );
166
+
167
+ CREATE TABLE comments (
168
+ id SERIAL(100),
169
+ post_id INT DEFAULT NULL,
170
+ type VARCHAR(255) DEFAULT NULL,
171
+ body CHAR(3000) DEFAULT NULL
172
+ );
173
+
174
+ CREATE TABLE authors (
175
+ id SERIAL(100),
176
+ name VARCHAR(255) DEFAULT NULL
177
+ );
178
+
179
+ CREATE TABLE tasks (
180
+ id SERIAL(100),
181
+ starting DATETIME YEAR TO FRACTION(5) DEFAULT NULL,
182
+ ending DATETIME YEAR TO FRACTION(5) DEFAULT NULL
183
+ );
184
+
185
+ CREATE TABLE categories (
186
+ id SERIAL(100),
187
+ name VARCHAR(255) NOT NULL,
188
+ type VARCHAR(40) DEFAULT NULL
189
+ );
190
+
191
+ CREATE TABLE categories_posts (
192
+ category_id INT NOT NULL,
193
+ post_id INT NOT NULL
194
+ );
195
+
196
+ CREATE TABLE keyboards (
197
+ key_number SERIAL(100),
198
+ name VARCHAR(255)
199
+ );
200
+
201
+ CREATE TABLE fk_test_has_pk (
202
+ id INT NOT NULL PRIMARY KEY
203
+ );
204
+
205
+ CREATE TABLE fk_test_has_fk (
206
+ id INT NOT NULL PRIMARY KEY,
207
+ fk_id INT NOT NULL,
208
+
209
+ FOREIGN KEY (fk_id) REFERENCES fk_test_has_pk(id)
210
+ );
211
+
212
+ --This table has an altered lock_version column name
213
+ CREATE TABLE legacy_things (
214
+ id SERIAL(100),
215
+ tps_report_number INT DEFAULT NULL,
216
+ version INT DEFAULT 0,
217
+ PRIMARY KEY (id)
218
+ );
219
+
220
+ CREATE TABLE numeric_data (
221
+ id SERIAL(100),
222
+ bank_balance DECIMAL(10,2),
223
+ big_bank_balance DECIMAL(15,2),
224
+ world_population DECIMAL(10),
225
+ my_house_population DECIMAL(2),
226
+ decimal_number_with_default DECIMAL(3,2) DEFAULT 2.78
227
+ );
228
+
229
+ CREATE TABLE mixed_case_monkeys (
230
+ monkeyID SERIAL(100),
231
+ fleaCount INT DEFAULT 0,
232
+ PRIMARY KEY (monkeyID)
233
+ );
234
+
@@ -0,0 +1,2 @@
1
+ DROP TABLE courses;
2
+
@@ -0,0 +1,5 @@
1
+ CREATE TABLE courses (
2
+ id INT NOT NULL PRIMARY KEY,
3
+ name VARCHAR(255) NOT NULL
4
+ );
5
+
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ibm_db
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.5
7
- date: 2007-06-19 00:00:00 -04:00
6
+ version: 0.8.0
7
+ date: 2007-08-08 00:00:00 -04:00
8
8
  summary: "Rails Driver and Adapter for IBM Data Servers: {LUW, zOS, i5, IDS}"
9
9
  require_paths:
10
10
  - lib
@@ -31,10 +31,9 @@ authors:
31
31
  files:
32
32
  - CHANGES
33
33
  - ext
34
+ - ext/ruby_ibm_db.h
34
35
  - ext/extconf.rb
35
36
  - ext/ibm_db.c
36
- - ext/ruby_ibm_db.h
37
- - init.rb
38
37
  - lib
39
38
  - lib/active_record
40
39
  - lib/active_record/connection_adapters
@@ -42,20 +41,15 @@ files:
42
41
  - lib/active_record/vendor
43
42
  - lib/active_record/vendor/db2-i5-zOS.yaml
44
43
  - lib/IBM_DB.rb
45
- - lib/linux32
46
- - lib/linux32/ibm_db.so
47
44
  - LICENSE
48
45
  - MANIFEST
49
46
  - README
47
+ - init.rb
50
48
  - test
51
- - test/adapter_test.rb
52
- - test/associations
53
- - test/associations/eager_test.rb
54
- - test/associations_test.rb
55
- - test/base_test.rb
56
49
  - test/connections
57
50
  - test/connections/native_ibm_db
58
51
  - test/connections/native_ibm_db/connection.rb
52
+ - test/base_test.rb
59
53
  - test/fixtures
60
54
  - test/fixtures/db_definitions
61
55
  - test/fixtures/db_definitions/i5
@@ -64,6 +58,10 @@ files:
64
58
  - test/fixtures/db_definitions/i5/ibm_db2.drop.sql
65
59
  - test/fixtures/db_definitions/i5/ibm_db2.sql
66
60
  - test/fixtures/db_definitions/ids
61
+ - test/fixtures/db_definitions/ids/ibm_db.drop.sql
62
+ - test/fixtures/db_definitions/ids/ibm_db.sql
63
+ - test/fixtures/db_definitions/ids/ibm_db2.drop.sql
64
+ - test/fixtures/db_definitions/ids/ibm_db2.sql
67
65
  - test/fixtures/db_definitions/luw
68
66
  - test/fixtures/db_definitions/luw/ibm_db.drop.sql
69
67
  - test/fixtures/db_definitions/luw/ibm_db.sql
@@ -74,9 +72,13 @@ files:
74
72
  - test/fixtures/db_definitions/zOS/ibm_db.sql
75
73
  - test/fixtures/db_definitions/zOS/ibm_db2.drop.sql
76
74
  - test/fixtures/db_definitions/zOS/ibm_db2.sql
75
+ - test/migration_test.rb
77
76
  - test/ibm_db_test.rb
78
77
  - test/locking_test.rb
79
- - test/migration_test.rb
78
+ - test/associations
79
+ - test/associations/eager_test.rb
80
+ - test/adapter_test.rb
81
+ - test/associations_test.rb
80
82
  test_files:
81
83
  - test/ibm_db_test.rb
82
84
  rdoc_options: []
Binary file