Kouhei Sutou
null+****@clear*****
Mon Mar 6 12:56:41 JST 2017
Kouhei Sutou 2017-03-06 12:56:41 +0900 (Mon, 06 Mar 2017) New Revision: 12af10fa5aea31519ebd9a11d8859d34f9d760ae https://github.com/ranguba/groonga-client-model/commit/12af10fa5aea31519ebd9a11d8859d34f9d760ae Message: migration: support time Modified files: lib/groonga_client_model/migration.rb test/unit/migration/test_create_table.rb Modified: lib/groonga_client_model/migration.rb (+4 -0) =================================================================== --- lib/groonga_client_model/migration.rb 2017-03-06 12:54:47 +0900 (35fd700) +++ lib/groonga_client_model/migration.rb 2017-03-06 12:56:41 +0900 (a49b777) @@ -344,6 +344,10 @@ module GroongaClientModel @migration.add_column(@table_name, column_name, :float, options) end + def time(column_name, options={}) + @migration.add_column(@table_name, column_name, :time, options) + end + def short_text(column_name, options={}) @migration.add_column(@table_name, column_name, :short_text, options) end Modified: test/unit/migration/test_create_table.rb (+8 -0) =================================================================== --- test/unit/migration/test_create_table.rb 2017-03-06 12:54:47 +0900 (dfaee76) +++ test/unit/migration/test_create_table.rb 2017-03-06 12:56:41 +0900 (0fb3af6) @@ -238,6 +238,14 @@ column_create posts #{column_name} COLUMN_SCALAR #{groonga_type} end end + sub_test_case("#time") do + test("default") do + assert_migrate_add_column(:published_at, "Time") do |table| + table.time(:published_at) + end + end + end + sub_test_case("#short_text") do test("default") do assert_migrate_add_column(:title, "ShortText") do |table| -------------- next part -------------- HTML����������������������������...Download