groonga-client-model 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +18 -0
- data/lib/groonga_client_model/migration.rb +18 -3
- data/lib/groonga_client_model/railties/groonga.rake +7 -2
- data/lib/groonga_client_model/schema_loader.rb +6 -0
- data/lib/groonga_client_model/test/groonga_server_runner.rb +2 -2
- data/lib/groonga_client_model/version.rb +1 -1
- data/test/apps/rails4/Gemfile.lock +3 -3
- data/test/apps/rails4/log/test.log +219 -0
- data/test/apps/rails4/test/tmp/db/groonga/migrate/20170321050929_create_posts.rb +8 -0
- data/test/apps/rails5/Gemfile.lock +2 -2
- data/test/apps/rails5/log/test.log +247 -0
- data/test/apps/rails5/test/tmp/db/groonga/migrate/20170321050953_set_config_alias_column.rb +10 -0
- data/test/unit/migration/test_rename_column.rb +67 -0
- metadata +9 -7
- data/test/apps/rails4/test/tmp/db/groonga/migrate/20170307045825_set_config_alias_column.rb +0 -10
- data/test/apps/rails5/test/tmp/db/groonga/migrate/20170307081511_remove_title_from_posts.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53294810644c656d0b3131a95e1bee1816fe054b
|
4
|
+
data.tar.gz: 7aeda35aaf8a4c9db7ca66325a002839acee273f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54110c1264f47c3e44323d55da1e555de2c5f1f531465b4c50606cb88c59035dca85fbbff38f85ec683d06d5095bcaf213a1cda587c32191ac05a45b6417e9b4
|
7
|
+
data.tar.gz: 89a7c173a7bd08a4f564a5754da17602275a483708372639dccef30fef2ddb35521bdb6b72d754554bd8c492fb98329b930ac6807212a5e2b32c3d3ceeac47c5
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# NEWS
|
2
2
|
|
3
|
+
## 1.0.2 - 2018-02-13
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* migration: Added `#rename_column` support.
|
8
|
+
[GitHub#8][Patch by Horimoto Yasuhiro]
|
9
|
+
|
10
|
+
### Fixes
|
11
|
+
|
12
|
+
* Fixed a bug that `groonga:schema:load` doesn't load
|
13
|
+
`db/schema.grn`. [GitHub#1][Reported by okkez]
|
14
|
+
|
15
|
+
### Thanks
|
16
|
+
|
17
|
+
* okkez
|
18
|
+
|
19
|
+
* Horimoto Yasuhiro
|
20
|
+
|
3
21
|
## 1.0.1 - 2016-03-09
|
4
22
|
|
5
23
|
### Improvements
|
@@ -179,6 +179,22 @@ module GroongaClientModel
|
|
179
179
|
end
|
180
180
|
end
|
181
181
|
|
182
|
+
def rename_column(table_name,
|
183
|
+
old_column_name, new_column_name)
|
184
|
+
if @reverting
|
185
|
+
@pending_actions << [:rename_column, table_name, new_column_name, old_column_name]
|
186
|
+
return
|
187
|
+
end
|
188
|
+
|
189
|
+
report(__method__, [table_name, old_column_name, new_column_name]) do
|
190
|
+
@client.request(:column_rename).
|
191
|
+
parameter(:table, table_name).
|
192
|
+
parameter(:name, old_column_name).
|
193
|
+
parameter(:new_name, new_column_name).
|
194
|
+
response
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
182
198
|
def remove_column(table_name, column_name)
|
183
199
|
if @reverting
|
184
200
|
message = "can't revert remove_column(#{table_name}, #{column_name})"
|
@@ -343,9 +359,8 @@ module GroongaClientModel
|
|
343
359
|
when "index", /\A(?:COLUMN_)?INDEX\z/i
|
344
360
|
"COLUMN_INDEX"
|
345
361
|
else
|
346
|
-
message = "
|
347
|
-
message << "[:
|
348
|
-
message << "#{type.inspect}"
|
362
|
+
message = "column type must be one of "
|
363
|
+
message << "[:scalar, :vector, :index]: #{type.inspect}"
|
349
364
|
raise ArgumentError, message
|
350
365
|
end
|
351
366
|
end
|
@@ -28,9 +28,14 @@ namespace :groonga do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
namespace :schema do
|
31
|
-
|
31
|
+
schema_path = GroongaClientModel::SchemaLoader.default_path
|
32
|
+
desc "Loads #{schema_path} into the Groonga database"
|
32
33
|
task load: ["config:load"] do
|
33
|
-
|
34
|
+
full_schema_path = Rails.root + schema_path
|
35
|
+
unless full_schema_path.exist?
|
36
|
+
raise "Schema file doesn't exist: #{full_schema_path}"
|
37
|
+
end
|
38
|
+
schema_loader = GroongaClientModel::SchemaLoader.new(full_schema_path)
|
34
39
|
schema_loader.load
|
35
40
|
end
|
36
41
|
end
|
@@ -41,8 +41,8 @@ module GroongaClientModel
|
|
41
41
|
base_dir = Pathname.pwd
|
42
42
|
end
|
43
43
|
|
44
|
-
schema_path = base_dir +
|
45
|
-
migrate_path = base_dir +
|
44
|
+
schema_path = base_dir + SchemaLoader.default_path
|
45
|
+
migrate_path = base_dir + Migrator.default_search_path
|
46
46
|
if schema_path.exist?
|
47
47
|
schema_path.open do |schema_file|
|
48
48
|
schema_loader = SchemaLoader.new(schema_file)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../../../groonga-client
|
3
3
|
specs:
|
4
|
-
groonga-client (0.4.
|
4
|
+
groonga-client (0.4.3)
|
5
5
|
gqtp (>= 1.0.4)
|
6
6
|
groonga-command (>= 1.2.8)
|
7
7
|
groonga-command-parser (>= 1.0.7)
|
@@ -10,7 +10,7 @@ PATH
|
|
10
10
|
PATH
|
11
11
|
remote: ../../../
|
12
12
|
specs:
|
13
|
-
groonga-client-model (1.0.
|
13
|
+
groonga-client-model (1.0.2)
|
14
14
|
activemodel
|
15
15
|
groonga-client (>= 0.4.2)
|
16
16
|
groonga-command-parser
|
@@ -82,7 +82,7 @@ GEM
|
|
82
82
|
groonga-command-parser (1.0.9)
|
83
83
|
groonga-command (>= 1.3.2)
|
84
84
|
json-stream
|
85
|
-
hashie (3.5.
|
85
|
+
hashie (3.5.5)
|
86
86
|
i18n (0.8.0)
|
87
87
|
jbuilder (2.6.1)
|
88
88
|
activesupport (>= 3.0.0, < 5.1)
|
@@ -1790,3 +1790,222 @@ PostTest: test_.create([Hash])
|
|
1790
1790
|
[1m[35mselect (45.8ms)[0m [1m[34mselect --filter "_id == 1" --limit "1" --match_columns "body" --table "posts"[0m
|
1791
1791
|
[1m[35mselect (1.1ms)[0m [1m[34mselect --filter "_id == 2" --limit "1" --match_columns "body" --table "posts"[0m
|
1792
1792
|
[1m[36mshutdown (0.7ms)[0m [1m[35mshutdown[0m
|
1793
|
+
---------------------------------------
|
1794
|
+
MigrationGeneratorTest: test_add_column
|
1795
|
+
---------------------------------------
|
1796
|
+
------------------------------------------
|
1797
|
+
MigrationGeneratorTest: test_remove_column
|
1798
|
+
------------------------------------------
|
1799
|
+
---------------------------------------
|
1800
|
+
MigrationGeneratorTest: test_set_config
|
1801
|
+
---------------------------------------
|
1802
|
+
------------------------------------------
|
1803
|
+
MigrationGeneratorTest: test_delete_config
|
1804
|
+
------------------------------------------
|
1805
|
+
----------------------------------------------
|
1806
|
+
MigrationGeneratorTest: test_set_config:_value
|
1807
|
+
----------------------------------------------
|
1808
|
+
-----------------------------------------
|
1809
|
+
MigrationGeneratorTest: test_create_table
|
1810
|
+
-----------------------------------------
|
1811
|
+
-----------------------------------------------
|
1812
|
+
MigrationGeneratorTest: test_create_table:__key
|
1813
|
+
-----------------------------------------------
|
1814
|
+
---------------------------------------------
|
1815
|
+
PostsControllerTest: test_should_destroy_post
|
1816
|
+
---------------------------------------------
|
1817
|
+
[1m[36mobject_exist (1.6ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1818
|
+
[1m[36mtable_create (1.2ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1819
|
+
[1m[36mtable_create (1.2ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1820
|
+
[1m[36mcolumn_create (1.7ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1821
|
+
[1m[36mcolumn_create (1.6ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1822
|
+
[1m[36mload (1.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1823
|
+
[1m[36mtable_create (1.7ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1824
|
+
[1m[36mschema (2.7ms)[0m [1m[35mschema[0m
|
1825
|
+
[1m[36mcolumn_create (2.0ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1826
|
+
[1m[36mload (1.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1827
|
+
[1m[36mtable_create (1.5ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1828
|
+
[1m[36mload (1.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1829
|
+
[1m[36mschema (2.8ms)[0m [1m[35mschema[0m
|
1830
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1831
|
+
[1m[35mselect (1.6ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
1832
|
+
Processing by PostsController#destroy as HTML
|
1833
|
+
Parameters: {"id"=>"1"}
|
1834
|
+
[1m[35mselect (50.8ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
1835
|
+
[1m[36mdelete (1.0ms)[0m [1m[31mdelete --filter "_id == 1" --table "posts"[0m
|
1836
|
+
Redirected to http://test.host/posts
|
1837
|
+
Completed 302 Found in 54ms (Groonga: 51.7ms)
|
1838
|
+
[1m[35mselect (0.8ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
1839
|
+
[1m[36mshutdown (0.7ms)[0m [1m[35mshutdown[0m
|
1840
|
+
----------------------------------------
|
1841
|
+
PostsControllerTest: test_should_get_new
|
1842
|
+
----------------------------------------
|
1843
|
+
[1m[36mobject_exist (2.4ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1844
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1845
|
+
[1m[36mtable_create (2.1ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1846
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1847
|
+
[1m[36mcolumn_create (2.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1848
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1849
|
+
[1m[36mtable_create (2.4ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1850
|
+
[1m[36mschema (4.6ms)[0m [1m[35mschema[0m
|
1851
|
+
[1m[36mcolumn_create (3.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1852
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1853
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1854
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1855
|
+
[1m[36mload (3.7ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1856
|
+
Processing by PostsController#new as HTML
|
1857
|
+
Rendered posts/_form.html.erb (21.4ms)
|
1858
|
+
Rendered posts/new.html.erb within layouts/application (25.8ms)
|
1859
|
+
Completed 200 OK in 243ms (Views: 242.7ms | Groonga: 0.0ms)
|
1860
|
+
[1m[36mshutdown (1.1ms)[0m [1m[35mshutdown[0m
|
1861
|
+
-----------------------------------------
|
1862
|
+
PostsControllerTest: test_should_get_edit
|
1863
|
+
-----------------------------------------
|
1864
|
+
[1m[36mobject_exist (2.5ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1865
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1866
|
+
[1m[36mtable_create (2.1ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1867
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1868
|
+
[1m[36mcolumn_create (2.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1869
|
+
[1m[36mload (2.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1870
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1871
|
+
[1m[36mschema (5.6ms)[0m [1m[35mschema[0m
|
1872
|
+
[1m[36mcolumn_create (3.6ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1873
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1874
|
+
[1m[36mtable_create (2.4ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1875
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1876
|
+
[1m[36mload (3.8ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1877
|
+
Processing by PostsController#edit as HTML
|
1878
|
+
Parameters: {"id"=>"1"}
|
1879
|
+
[1m[35mselect (51.2ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
1880
|
+
Rendered posts/_form.html.erb (1.2ms)
|
1881
|
+
Rendered posts/edit.html.erb within layouts/application (1.9ms)
|
1882
|
+
Completed 200 OK in 56ms (Views: 3.6ms | Groonga: 51.2ms)
|
1883
|
+
[1m[36mshutdown (1.0ms)[0m [1m[35mshutdown[0m
|
1884
|
+
------------------------------------------
|
1885
|
+
PostsControllerTest: test_should_show_post
|
1886
|
+
------------------------------------------
|
1887
|
+
[1m[36mobject_exist (2.5ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1888
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1889
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1890
|
+
[1m[36mcolumn_create (2.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1891
|
+
[1m[36mcolumn_create (2.8ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1892
|
+
[1m[36mload (2.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1893
|
+
[1m[36mtable_create (2.5ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1894
|
+
[1m[36mschema (4.7ms)[0m [1m[35mschema[0m
|
1895
|
+
[1m[36mcolumn_create (3.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1896
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1897
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1898
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1899
|
+
[1m[36mload (3.8ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1900
|
+
Processing by PostsController#show as HTML
|
1901
|
+
Parameters: {"id"=>"1"}
|
1902
|
+
[1m[35mselect (59.2ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
1903
|
+
Rendered posts/show.html.erb within layouts/application (0.6ms)
|
1904
|
+
Completed 200 OK in 63ms (Views: 2.4ms | Groonga: 59.2ms)
|
1905
|
+
[1m[36mshutdown (0.9ms)[0m [1m[35mshutdown[0m
|
1906
|
+
------------------------------------------
|
1907
|
+
PostsControllerTest: test_should_get_index
|
1908
|
+
------------------------------------------
|
1909
|
+
[1m[36mobject_exist (2.7ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1910
|
+
[1m[36mtable_create (2.4ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1911
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1912
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1913
|
+
[1m[36mcolumn_create (2.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1914
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1915
|
+
[1m[36mtable_create (2.4ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1916
|
+
[1m[36mschema (4.7ms)[0m [1m[35mschema[0m
|
1917
|
+
[1m[36mcolumn_create (3.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1918
|
+
[1m[36mload (3.7ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1919
|
+
[1m[36mtable_create (3.3ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1920
|
+
[1m[36mload (4.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1921
|
+
[1m[36mload (4.7ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1922
|
+
Processing by PostsController#index as HTML
|
1923
|
+
[1m[35mselect (3.7ms)[0m [1m[34mselect --limit "-1" --match_columns "body" --table "posts"[0m
|
1924
|
+
Rendered posts/index.html.erb within layouts/application (21.1ms)
|
1925
|
+
Completed 200 OK in 29ms (Views: 24.6ms | Groonga: 3.7ms)
|
1926
|
+
[1m[36mshutdown (1.5ms)[0m [1m[35mshutdown[0m
|
1927
|
+
--------------------------------------------
|
1928
|
+
PostsControllerTest: test_should_create_post
|
1929
|
+
--------------------------------------------
|
1930
|
+
[1m[36mobject_exist (3.2ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1931
|
+
[1m[36mtable_create (3.2ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1932
|
+
[1m[36mtable_create (3.0ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1933
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1934
|
+
[1m[36mcolumn_create (3.0ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1935
|
+
[1m[36mload (3.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1936
|
+
[1m[36mtable_create (2.5ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1937
|
+
[1m[36mschema (6.0ms)[0m [1m[35mschema[0m
|
1938
|
+
[1m[36mcolumn_create (4.5ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1939
|
+
[1m[36mload (3.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1940
|
+
[1m[36mtable_create (3.3ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1941
|
+
[1m[36mload (3.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1942
|
+
[1m[36mload (4.4ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1943
|
+
[1m[35mselect (3.6ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
1944
|
+
Processing by PostsController#create as HTML
|
1945
|
+
Parameters: {"post"=>{"body"=>"World", "title"=>"Hello"}}
|
1946
|
+
[1m[36mload (4.2ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1947
|
+
Redirected to http://test.host/posts/2
|
1948
|
+
Completed 302 Found in 7ms (Groonga: 4.2ms)
|
1949
|
+
[1m[35mselect (3.0ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
1950
|
+
[1m[36mshutdown (2.7ms)[0m [1m[35mshutdown[0m
|
1951
|
+
--------------------------------------------
|
1952
|
+
PostsControllerTest: test_should_update_post
|
1953
|
+
--------------------------------------------
|
1954
|
+
[1m[36mobject_exist (3.5ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1955
|
+
[1m[36mtable_create (3.6ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1956
|
+
[1m[36mtable_create (3.3ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1957
|
+
[1m[36mcolumn_create (3.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1958
|
+
[1m[36mcolumn_create (3.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1959
|
+
[1m[36mload (3.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1960
|
+
[1m[36mtable_create (3.4ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1961
|
+
[1m[36mschema (7.8ms)[0m [1m[35mschema[0m
|
1962
|
+
[1m[36mcolumn_create (4.0ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1963
|
+
[1m[36mload (3.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1964
|
+
[1m[36mtable_create (3.1ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1965
|
+
[1m[36mload (3.6ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1966
|
+
[1m[36mload (5.7ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
1967
|
+
Processing by PostsController#update as HTML
|
1968
|
+
Parameters: {"post"=>{"body"=>"World", "title"=>"Hello"}, "id"=>"1"}
|
1969
|
+
[1m[35mselect (56.1ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
1970
|
+
[1m[36mload (1.4ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"_id\":1,\"body\":\"World\",\"title\":\"Hello\"}\n]"[0m
|
1971
|
+
Redirected to http://test.host/posts/1
|
1972
|
+
Completed 302 Found in 61ms (Groonga: 57.5ms)
|
1973
|
+
[1m[36mshutdown (0.8ms)[0m [1m[35mshutdown[0m
|
1974
|
+
----------------------------
|
1975
|
+
PostTest: test_.create(Hash)
|
1976
|
+
----------------------------
|
1977
|
+
[1m[36mobject_exist (3.4ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1978
|
+
[1m[36mtable_create (3.6ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1979
|
+
[1m[36mtable_create (3.1ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1980
|
+
[1m[36mcolumn_create (3.0ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1981
|
+
[1m[36mcolumn_create (2.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
1982
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
1983
|
+
[1m[36mtable_create (2.4ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
1984
|
+
[1m[36mschema (4.6ms)[0m [1m[35mschema[0m
|
1985
|
+
[1m[36mcolumn_create (3.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
1986
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
1987
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
1988
|
+
[1m[36mload (2.7ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
1989
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\"}\n]"[0m
|
1990
|
+
[1m[35mselect (54.0ms)[0m [1m[34mselect --filter "_id == 1" --limit "1" --match_columns "body" --table "posts"[0m
|
1991
|
+
[1m[36mshutdown (0.7ms)[0m [1m[35mshutdown[0m
|
1992
|
+
------------------------------
|
1993
|
+
PostTest: test_.create([Hash])
|
1994
|
+
------------------------------
|
1995
|
+
[1m[36mobject_exist (2.3ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
1996
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
1997
|
+
[1m[36mtable_create (2.1ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
1998
|
+
[1m[36mcolumn_create (2.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
1999
|
+
[1m[36mcolumn_create (2.1ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
2000
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120517}]"[0m
|
2001
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
2002
|
+
[1m[36mschema (4.5ms)[0m [1m[35mschema[0m
|
2003
|
+
[1m[36mcolumn_create (3.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
2004
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120527}]"[0m
|
2005
|
+
[1m[36mtable_create (2.1ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
2006
|
+
[1m[36mload (2.1ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303120536}]"[0m
|
2007
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello1\"}\n]"[0m
|
2008
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello2\"}\n]"[0m
|
2009
|
+
[1m[35mselect (52.6ms)[0m [1m[34mselect --filter "_id == 1" --limit "1" --match_columns "body" --table "posts"[0m
|
2010
|
+
[1m[35mselect (1.1ms)[0m [1m[34mselect --filter "_id == 2" --limit "1" --match_columns "body" --table "posts"[0m
|
2011
|
+
[1m[36mshutdown (0.7ms)[0m [1m[35mshutdown[0m
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../../../groonga-client
|
3
3
|
specs:
|
4
|
-
groonga-client (0.4.
|
4
|
+
groonga-client (0.4.3)
|
5
5
|
gqtp (>= 1.0.4)
|
6
6
|
groonga-command (>= 1.2.8)
|
7
7
|
groonga-command-parser (>= 1.0.7)
|
@@ -10,7 +10,7 @@ PATH
|
|
10
10
|
PATH
|
11
11
|
remote: ../../../
|
12
12
|
specs:
|
13
|
-
groonga-client-model (1.0.
|
13
|
+
groonga-client-model (1.0.2)
|
14
14
|
activemodel
|
15
15
|
groonga-client (>= 0.4.2)
|
16
16
|
groonga-command-parser
|
@@ -11075,3 +11075,250 @@ PostTest: test_.create([Hash])
|
|
11075
11075
|
[1m[35mselect (51.7ms)[0m [1m[34mselect --filter "_id == 1" --limit "1" --match_columns "body" --table "posts"[0m
|
11076
11076
|
[1m[35mselect (0.9ms)[0m [1m[34mselect --filter "_id == 2" --limit "1" --match_columns "body" --table "posts"[0m
|
11077
11077
|
[1m[36mshutdown (0.6ms)[0m [1m[35mshutdown[0m
|
11078
|
+
----------------------------
|
11079
|
+
PostTest: test_.create(Hash)
|
11080
|
+
----------------------------
|
11081
|
+
[1m[36mobject_exist (3.0ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11082
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11083
|
+
[1m[36mtable_create (2.5ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11084
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11085
|
+
[1m[36mcolumn_create (2.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11086
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11087
|
+
[1m[36mtable_create (2.7ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11088
|
+
[1m[36mschema (4.6ms)[0m [1m[35mschema[0m
|
11089
|
+
[1m[36mcolumn_create (3.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11090
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11091
|
+
[1m[36mtable_create (2.6ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11092
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11093
|
+
[1m[36mschema (5.1ms)[0m [1m[35mschema[0m
|
11094
|
+
[1m[36mload (2.7ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\"}\n]"[0m
|
11095
|
+
[1m[35mselect (63.9ms)[0m [1m[34mselect --filter "_id == 1" --limit "1" --match_columns "body" --table "posts"[0m
|
11096
|
+
[1m[36mshutdown (0.7ms)[0m [1m[35mshutdown[0m
|
11097
|
+
------------------------------
|
11098
|
+
PostTest: test_.create([Hash])
|
11099
|
+
------------------------------
|
11100
|
+
[1m[36mobject_exist (2.7ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11101
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11102
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11103
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11104
|
+
[1m[36mcolumn_create (2.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11105
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11106
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11107
|
+
[1m[36mschema (4.6ms)[0m [1m[35mschema[0m
|
11108
|
+
[1m[36mcolumn_create (3.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11109
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11110
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11111
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11112
|
+
[1m[36mload (2.5ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello1\"}\n]"[0m
|
11113
|
+
[1m[36mload (2.8ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello2\"}\n]"[0m
|
11114
|
+
[1m[35mselect (58.4ms)[0m [1m[34mselect --filter "_id == 1" --limit "1" --match_columns "body" --table "posts"[0m
|
11115
|
+
[1m[35mselect (1.1ms)[0m [1m[34mselect --filter "_id == 2" --limit "1" --match_columns "body" --table "posts"[0m
|
11116
|
+
[1m[36mshutdown (0.7ms)[0m [1m[35mshutdown[0m
|
11117
|
+
--------------------------------------------
|
11118
|
+
PostsControllerTest: test_should_create_post
|
11119
|
+
--------------------------------------------
|
11120
|
+
[1m[36mobject_exist (1.6ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11121
|
+
[1m[36mtable_create (1.5ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11122
|
+
[1m[36mtable_create (1.4ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11123
|
+
[1m[36mcolumn_create (1.7ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11124
|
+
[1m[36mcolumn_create (1.7ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11125
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11126
|
+
[1m[36mtable_create (2.2ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11127
|
+
[1m[36mschema (4.8ms)[0m [1m[35mschema[0m
|
11128
|
+
[1m[36mcolumn_create (3.5ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11129
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11130
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11131
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11132
|
+
[1m[36mload (3.7ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11133
|
+
[1m[35mselect (2.6ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
11134
|
+
Started POST "/posts" for 127.0.0.1 at 2017-03-21 14:09:51 +0900
|
11135
|
+
Processing by PostsController#create as HTML
|
11136
|
+
Parameters: {"post"=>{"body"=>"World", "title"=>"Hello"}}
|
11137
|
+
[1m[36mload (1.4ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11138
|
+
Redirected to http://www.example.com/posts/2
|
11139
|
+
Completed 302 Found in 23ms (Groonga: 1.4ms)
|
11140
|
+
[1m[35mselect (1.2ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
11141
|
+
[1m[35mselect (1.2ms)[0m [1m[34mselect --limit "1" --match_columns "body" --sort_keys "-_id" --sortby "-_id" --table "posts"[0m
|
11142
|
+
[1m[36mshutdown (1.0ms)[0m [1m[35mshutdown[0m
|
11143
|
+
-----------------------------------------
|
11144
|
+
PostsControllerTest: test_should_get_edit
|
11145
|
+
-----------------------------------------
|
11146
|
+
[1m[36mobject_exist (2.3ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11147
|
+
[1m[36mtable_create (2.1ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11148
|
+
[1m[36mtable_create (2.6ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11149
|
+
[1m[36mcolumn_create (2.8ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11150
|
+
[1m[36mcolumn_create (2.7ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11151
|
+
[1m[36mload (2.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11152
|
+
[1m[36mtable_create (2.8ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11153
|
+
[1m[36mschema (5.5ms)[0m [1m[35mschema[0m
|
11154
|
+
[1m[36mcolumn_create (3.9ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11155
|
+
[1m[36mload (2.7ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11156
|
+
[1m[36mtable_create (2.6ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11157
|
+
[1m[36mload (2.6ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11158
|
+
[1m[36mload (4.2ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11159
|
+
Started GET "/posts/1/edit" for 127.0.0.1 at 2017-03-21 14:09:51 +0900
|
11160
|
+
Processing by PostsController#edit as HTML
|
11161
|
+
Parameters: {"id"=>"1"}
|
11162
|
+
[1m[35mselect (52.3ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
11163
|
+
Rendering posts/edit.html.erb within layouts/application
|
11164
|
+
Rendered posts/_form.html.erb (12.9ms)
|
11165
|
+
Rendered posts/edit.html.erb within layouts/application (15.0ms)
|
11166
|
+
Completed 200 OK in 275ms (Views: 219.0ms | Groonga: 52.3ms)
|
11167
|
+
[1m[36mshutdown (1.2ms)[0m [1m[35mshutdown[0m
|
11168
|
+
------------------------------------------
|
11169
|
+
PostsControllerTest: test_should_get_index
|
11170
|
+
------------------------------------------
|
11171
|
+
[1m[36mobject_exist (2.7ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11172
|
+
[1m[36mtable_create (3.0ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11173
|
+
[1m[36mtable_create (2.8ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11174
|
+
[1m[36mcolumn_create (2.6ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11175
|
+
[1m[36mcolumn_create (2.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11176
|
+
[1m[36mload (2.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11177
|
+
[1m[36mtable_create (2.4ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11178
|
+
[1m[36mschema (6.3ms)[0m [1m[35mschema[0m
|
11179
|
+
[1m[36mcolumn_create (2.7ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11180
|
+
[1m[36mload (1.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11181
|
+
[1m[36mtable_create (1.4ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11182
|
+
[1m[36mload (1.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11183
|
+
[1m[36mload (1.9ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11184
|
+
Started GET "/posts" for 127.0.0.1 at 2017-03-21 14:09:52 +0900
|
11185
|
+
Processing by PostsController#index as HTML
|
11186
|
+
Rendering posts/index.html.erb within layouts/application
|
11187
|
+
[1m[35mselect (1.4ms)[0m [1m[34mselect --limit "-1" --match_columns "body" --table "posts"[0m
|
11188
|
+
Rendered posts/index.html.erb within layouts/application (3.1ms)
|
11189
|
+
Completed 200 OK in 8ms (Views: 4.7ms | Groonga: 1.4ms)
|
11190
|
+
[1m[36mshutdown (1.2ms)[0m [1m[35mshutdown[0m
|
11191
|
+
----------------------------------------
|
11192
|
+
PostsControllerTest: test_should_get_new
|
11193
|
+
----------------------------------------
|
11194
|
+
[1m[36mobject_exist (1.5ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11195
|
+
[1m[36mtable_create (1.4ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11196
|
+
[1m[36mtable_create (1.0ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11197
|
+
[1m[36mcolumn_create (1.0ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11198
|
+
[1m[36mcolumn_create (1.0ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11199
|
+
[1m[36mload (0.9ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11200
|
+
[1m[36mtable_create (0.8ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11201
|
+
[1m[36mschema (1.7ms)[0m [1m[35mschema[0m
|
11202
|
+
[1m[36mcolumn_create (1.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11203
|
+
[1m[36mload (3.6ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11204
|
+
[1m[36mtable_create (2.7ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11205
|
+
[1m[36mload (1.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11206
|
+
[1m[36mload (1.8ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11207
|
+
Started GET "/posts/new" for 127.0.0.1 at 2017-03-21 14:09:52 +0900
|
11208
|
+
Processing by PostsController#new as HTML
|
11209
|
+
Rendering posts/new.html.erb within layouts/application
|
11210
|
+
Rendered posts/_form.html.erb (11.4ms)
|
11211
|
+
Rendered posts/new.html.erb within layouts/application (13.7ms)
|
11212
|
+
Completed 200 OK in 21ms (Views: 19.6ms | Groonga: 0.0ms)
|
11213
|
+
[1m[36mshutdown (1.4ms)[0m [1m[35mshutdown[0m
|
11214
|
+
--------------------------------------------
|
11215
|
+
PostsControllerTest: test_should_update_post
|
11216
|
+
--------------------------------------------
|
11217
|
+
[1m[36mobject_exist (3.3ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11218
|
+
[1m[36mtable_create (3.1ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11219
|
+
[1m[36mtable_create (3.4ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11220
|
+
[1m[36mcolumn_create (3.6ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11221
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11222
|
+
[1m[36mload (3.0ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11223
|
+
[1m[36mtable_create (4.4ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11224
|
+
[1m[36mschema (6.4ms)[0m [1m[35mschema[0m
|
11225
|
+
[1m[36mcolumn_create (4.5ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11226
|
+
[1m[36mload (3.9ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11227
|
+
[1m[36mtable_create (3.7ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11228
|
+
[1m[36mload (3.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11229
|
+
[1m[36mload (4.7ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11230
|
+
Started PATCH "/posts/1" for 127.0.0.1 at 2017-03-21 14:09:52 +0900
|
11231
|
+
Processing by PostsController#update as HTML
|
11232
|
+
Parameters: {"post"=>{"body"=>"World", "title"=>"Hello"}, "id"=>"1"}
|
11233
|
+
[1m[35mselect (47.6ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
11234
|
+
[1m[36mload (1.5ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"_id\":1,\"body\":\"World\",\"title\":\"Hello\"}\n]"[0m
|
11235
|
+
Redirected to http://www.example.com/posts/1
|
11236
|
+
Completed 302 Found in 54ms (Groonga: 49.1ms)
|
11237
|
+
[1m[36mshutdown (1.0ms)[0m [1m[35mshutdown[0m
|
11238
|
+
---------------------------------------------
|
11239
|
+
PostsControllerTest: test_should_destroy_post
|
11240
|
+
---------------------------------------------
|
11241
|
+
[1m[36mobject_exist (3.2ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11242
|
+
[1m[36mtable_create (3.4ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11243
|
+
[1m[36mtable_create (3.9ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11244
|
+
[1m[36mcolumn_create (3.7ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11245
|
+
[1m[36mcolumn_create (2.9ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11246
|
+
[1m[36mload (3.5ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11247
|
+
[1m[36mtable_create (3.5ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11248
|
+
[1m[36mschema (6.8ms)[0m [1m[35mschema[0m
|
11249
|
+
[1m[36mcolumn_create (3.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11250
|
+
[1m[36mload (3.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11251
|
+
[1m[36mtable_create (3.6ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11252
|
+
[1m[36mload (3.1ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11253
|
+
[1m[36mload (4.8ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11254
|
+
[1m[35mselect (3.4ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
11255
|
+
Started DELETE "/posts/1" for 127.0.0.1 at 2017-03-21 14:09:52 +0900
|
11256
|
+
Processing by PostsController#destroy as HTML
|
11257
|
+
Parameters: {"id"=>"1"}
|
11258
|
+
[1m[35mselect (54.0ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
11259
|
+
[1m[36mdelete (1.7ms)[0m [1m[31mdelete --filter "_id == 1" --table "posts"[0m
|
11260
|
+
Redirected to http://www.example.com/posts
|
11261
|
+
Completed 302 Found in 59ms (Groonga: 55.7ms)
|
11262
|
+
[1m[35mselect (1.5ms)[0m [1m[34mselect --limit "0" --match_columns "body" --output_columns "_id" --table "posts"[0m
|
11263
|
+
[1m[36mshutdown (1.2ms)[0m [1m[35mshutdown[0m
|
11264
|
+
------------------------------------------
|
11265
|
+
PostsControllerTest: test_should_show_post
|
11266
|
+
------------------------------------------
|
11267
|
+
[1m[36mobject_exist (3.1ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11268
|
+
[1m[36mtable_create (3.3ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11269
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11270
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11271
|
+
[1m[36mcolumn_create (2.2ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11272
|
+
[1m[36mload (3.2ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11273
|
+
[1m[36mtable_create (3.0ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11274
|
+
[1m[36mschema (4.7ms)[0m [1m[35mschema[0m
|
11275
|
+
[1m[36mcolumn_create (3.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11276
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11277
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11278
|
+
[1m[36mload (2.3ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11279
|
+
[1m[36mload (3.8ms)[0m [1m[32mload --command_version "3" --output_errors "yes" --output_ids "yes" --table "posts" --values "[\n{\"title\":\"Hello\",\"body\":\"World\"}\n]"[0m
|
11280
|
+
Started GET "/posts/1" for 127.0.0.1 at 2017-03-21 14:09:52 +0900
|
11281
|
+
Processing by PostsController#show as HTML
|
11282
|
+
Parameters: {"id"=>"1"}
|
11283
|
+
[1m[35mselect (50.5ms)[0m [1m[34mselect --filter "_id == \"1\"" --limit "1" --match_columns "body" --table "posts"[0m
|
11284
|
+
Rendering posts/show.html.erb within layouts/application
|
11285
|
+
Rendered posts/show.html.erb within layouts/application (0.6ms)
|
11286
|
+
Completed 200 OK in 56ms (Views: 2.3ms | Groonga: 50.5ms)
|
11287
|
+
[1m[36mshutdown (0.8ms)[0m [1m[35mshutdown[0m
|
11288
|
+
---------------------------------------------
|
11289
|
+
AgeTest: test_validate:__key:_invalid:_string
|
11290
|
+
---------------------------------------------
|
11291
|
+
[1m[36mobject_exist (2.5ms)[0m [1m[35mobject_exist --name "schema_versions"[0m
|
11292
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_PAT_KEY" --key_type "UInt64" --name "schema_versions"[0m
|
11293
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --flags "TABLE_NO_KEY" --name "posts"[0m
|
11294
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "title" --table "posts" --type "ShortText"[0m
|
11295
|
+
[1m[36mcolumn_create (2.3ms)[0m [1m[35mcolumn_create --flags "COLUMN_SCALAR" --name "body" --table "posts" --type "Text"[0m
|
11296
|
+
[1m[36mload (2.6ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170301061420}]"[0m
|
11297
|
+
[1m[36mtable_create (2.3ms)[0m [1m[35mtable_create --default_tokenizer "TokenBigram" --flags "TABLE_PAT_KEY" --key_type "ShortText" --name "terms" --normalizer "NormalizerAuto"[0m
|
11298
|
+
[1m[36mschema (4.7ms)[0m [1m[35mschema[0m
|
11299
|
+
[1m[36mcolumn_create (3.4ms)[0m [1m[35mcolumn_create --flags "COLUMN_INDEX|WITH_POSITION" --name "posts_body" --source "body" --table "terms" --type "posts"[0m
|
11300
|
+
[1m[36mload (2.6ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115054}]"[0m
|
11301
|
+
[1m[36mtable_create (2.4ms)[0m [1m[35mtable_create --flags "TABLE_HASH_KEY" --key_type "UInt32" --name "ages"[0m
|
11302
|
+
[1m[36mload (2.4ms)[0m [1m[32mload --table "schema_versions" --values "[{\"_key\":20170303115135}]"[0m
|
11303
|
+
[1m[36mshutdown (2.4ms)[0m [1m[35mshutdown[0m
|
11304
|
+
-----------------------------------------
|
11305
|
+
MigrationGeneratorTest: test_create_table
|
11306
|
+
-----------------------------------------
|
11307
|
+
---------------------------------------
|
11308
|
+
MigrationGeneratorTest: test_set_config
|
11309
|
+
---------------------------------------
|
11310
|
+
---------------------------------------
|
11311
|
+
MigrationGeneratorTest: test_add_column
|
11312
|
+
---------------------------------------
|
11313
|
+
------------------------------------------
|
11314
|
+
MigrationGeneratorTest: test_remove_column
|
11315
|
+
------------------------------------------
|
11316
|
+
-----------------------------------------------
|
11317
|
+
MigrationGeneratorTest: test_create_table:__key
|
11318
|
+
-----------------------------------------------
|
11319
|
+
------------------------------------------
|
11320
|
+
MigrationGeneratorTest: test_delete_config
|
11321
|
+
------------------------------------------
|
11322
|
+
----------------------------------------------
|
11323
|
+
MigrationGeneratorTest: test_set_config:_value
|
11324
|
+
----------------------------------------------
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Copyright (C) 2017 Yasuhiro Horimoto <horimoto@clear-code.com>
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
class TestMigrationRename < Test::Unit::TestCase
|
18
|
+
include GroongaClientModel::TestHelper
|
19
|
+
include TestHelper::Migration
|
20
|
+
|
21
|
+
setup do
|
22
|
+
open_client do |client|
|
23
|
+
client.table_create(name: "posts",
|
24
|
+
flags: "TABLE_HASH_KEY",
|
25
|
+
key_type: "ShortText")
|
26
|
+
client.column_create(table: "posts",
|
27
|
+
name: "content",
|
28
|
+
flags: "COLUMN_SCALAR",
|
29
|
+
type: "Text")
|
30
|
+
values = [
|
31
|
+
{"_key" => "Groonga", "content" => "Very good!"},
|
32
|
+
{"_key" => "Ruby", "content" => "Very exciting!"},
|
33
|
+
]
|
34
|
+
client.load(table: "posts",
|
35
|
+
values: values)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
test("#rename_column") do
|
40
|
+
expected_up_report = <<-REPORT
|
41
|
+
-- rename_column(:posts, "content", "new_content")
|
42
|
+
-> 0.0s
|
43
|
+
REPORT
|
44
|
+
expected_down_report = <<-REPORT
|
45
|
+
-- rename_column(:posts, "new_content", "content")
|
46
|
+
-> 0.0s
|
47
|
+
REPORT
|
48
|
+
expected_dump = <<-DUMP.chomp
|
49
|
+
table_create posts TABLE_HASH_KEY ShortText
|
50
|
+
column_create posts new_content COLUMN_SCALAR Text
|
51
|
+
|
52
|
+
load --table posts
|
53
|
+
[
|
54
|
+
["_key","new_content"],
|
55
|
+
["Groonga","Very good!"],
|
56
|
+
["Ruby","Very exciting!"]
|
57
|
+
]
|
58
|
+
DUMP
|
59
|
+
assert_migrate(expected_up_report,
|
60
|
+
expected_down_report,
|
61
|
+
expected_dump) do |migration|
|
62
|
+
migration.instance_eval do
|
63
|
+
rename_column(:posts, "content", "new_content")
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groonga-client-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: groonga-client
|
@@ -233,7 +233,7 @@ files:
|
|
233
233
|
- test/apps/rails4/test/generators/migration_generator_test.rb
|
234
234
|
- test/apps/rails4/test/models/post_test.rb
|
235
235
|
- test/apps/rails4/test/test_helper.rb
|
236
|
-
- test/apps/rails4/test/tmp/db/groonga/migrate/
|
236
|
+
- test/apps/rails4/test/tmp/db/groonga/migrate/20170321050929_create_posts.rb
|
237
237
|
- test/apps/rails4/tmp/cache/assets/sprockets/v3.0/1v/1vNbaFvqzPuMCPa9LBe2yL962Ncp7RbNREOlE_qe8Ss.cache
|
238
238
|
- test/apps/rails4/tmp/cache/assets/sprockets/v3.0/2F/2FyDjMLF22tXYLEKS6UqrqiSZTKp2HowmRsOZfW2dQs.cache
|
239
239
|
- test/apps/rails4/tmp/cache/assets/sprockets/v3.0/3Q/3QxCnPBwOHO-nainvNGREWb7QnMUKlPsx4AFZgNVVUI.cache
|
@@ -366,7 +366,7 @@ files:
|
|
366
366
|
- test/apps/rails5/test/models/age_test.rb
|
367
367
|
- test/apps/rails5/test/models/post_test.rb
|
368
368
|
- test/apps/rails5/test/test_helper.rb
|
369
|
-
- test/apps/rails5/test/tmp/db/groonga/migrate/
|
369
|
+
- test/apps/rails5/test/tmp/db/groonga/migrate/20170321050953_set_config_alias_column.rb
|
370
370
|
- test/apps/rails5/tmp/cache/assets/sprockets/v3.0/-X/-XSAop9IIcSTUV_xiFS6IsrwsKgzfBrhLSIgb3alOgI.cache
|
371
371
|
- test/apps/rails5/tmp/cache/assets/sprockets/v3.0/04/04zh1ytKDagWzWcqUyadXtzzohCn9iVvSVG4KrjpfPU.cache
|
372
372
|
- test/apps/rails5/tmp/cache/assets/sprockets/v3.0/05/05HAjV9iJX9zqV_rpyUQjVkKEvW5kK3XsyZauoD3MGU.cache
|
@@ -566,6 +566,7 @@ files:
|
|
566
566
|
- test/unit/migration/test_create_table.rb
|
567
567
|
- test/unit/migration/test_exist.rb
|
568
568
|
- test/unit/migration/test_load.rb
|
569
|
+
- test/unit/migration/test_rename_column.rb
|
569
570
|
- test/unit/record/test_active_model.rb
|
570
571
|
- test/unit/record/test_readers.rb
|
571
572
|
- test/unit/record/test_timestamps.rb
|
@@ -594,7 +595,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
594
595
|
version: '0'
|
595
596
|
requirements: []
|
596
597
|
rubyforge_project:
|
597
|
-
rubygems_version: 2.5.2
|
598
|
+
rubygems_version: 2.5.2.2
|
598
599
|
signing_key:
|
599
600
|
specification_version: 4
|
600
601
|
summary: Groonga-client-model is a model interface for groonga-client.
|
@@ -639,7 +640,7 @@ test_files:
|
|
639
640
|
- test/apps/rails4/test/models/post_test.rb
|
640
641
|
- test/apps/rails4/test/controllers/posts_controller_test.rb
|
641
642
|
- test/apps/rails4/test/test_helper.rb
|
642
|
-
- test/apps/rails4/test/tmp/db/groonga/migrate/
|
643
|
+
- test/apps/rails4/test/tmp/db/groonga/migrate/20170321050929_create_posts.rb
|
643
644
|
- test/apps/rails4/test/generators/migration_generator_test.rb
|
644
645
|
- test/apps/rails4/config/secrets.yml
|
645
646
|
- test/apps/rails4/config/routes.rb
|
@@ -767,7 +768,7 @@ test_files:
|
|
767
768
|
- test/apps/rails5/test/models/age_test.rb
|
768
769
|
- test/apps/rails5/test/controllers/posts_controller_test.rb
|
769
770
|
- test/apps/rails5/test/test_helper.rb
|
770
|
-
- test/apps/rails5/test/tmp/db/groonga/migrate/
|
771
|
+
- test/apps/rails5/test/tmp/db/groonga/migrate/20170321050953_set_config_alias_column.rb
|
771
772
|
- test/apps/rails5/test/generators/migration_generator_test.rb
|
772
773
|
- test/apps/rails5/config/secrets.yml
|
773
774
|
- test/apps/rails5/config/routes.rb
|
@@ -992,6 +993,7 @@ test_files:
|
|
992
993
|
- test/unit/migration/test_exist.rb
|
993
994
|
- test/unit/migration/test_config.rb
|
994
995
|
- test/unit/migration/test_load.rb
|
996
|
+
- test/unit/migration/test_rename_column.rb
|
995
997
|
- test/unit/migration/test_create_table.rb
|
996
998
|
- test/unit/fixtures/migrate/20170303115135_create_ages.rb
|
997
999
|
- test/unit/fixtures/migrate/20170301061420_create_posts.rb
|