[Groonga-commit] ranguba/groonga-client-model at ac2b23a [master] Use migration instead of schema.grn

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Mar 3 21:06:46 JST 2017


Kouhei Sutou	2017-03-03 21:06:46 +0900 (Fri, 03 Mar 2017)

  New Revision: ac2b23a64d0dbc12f0cd3b95f8d8ad4fa2efcb8f
  https://github.com/ranguba/groonga-client-model/commit/ac2b23a64d0dbc12f0cd3b95f8d8ad4fa2efcb8f

  Message:
    Use migration instead of schema.grn

  Added files:
    test/apps/rails4/db/groonga/migrate/20170303120517_create_posts.rb
    test/apps/rails4/db/groonga/migrate/20170303120527_create_terms.rb
    test/apps/rails4/db/groonga/migrate/20170303120536_create_ages.rb
  Removed files:
    test/apps/rails4/db/schema.grn
  Modified files:
    test/apps/rails4/Gemfile.lock

  Modified: test/apps/rails4/Gemfile.lock (+2 -2)
===================================================================
--- test/apps/rails4/Gemfile.lock    2017-03-03 21:04:21 +0900 (29623ca)
+++ test/apps/rails4/Gemfile.lock    2017-03-03 21:06:46 +0900 (8e92b07)
@@ -10,9 +10,9 @@ PATH
 PATH
   remote: ../../../
   specs:
-    groonga-client-model (1.0.0)
+    groonga-client-model (1.0.1)
       activemodel
-      groonga-client (>= 0.4.1)
+      groonga-client (>= 0.4.2)
       groonga-command-parser
 
 GEM

  Added: test/apps/rails4/db/groonga/migrate/20170303120517_create_posts.rb (+8 -0) 100644
===================================================================
--- /dev/null
+++ test/apps/rails4/db/groonga/migrate/20170303120517_create_posts.rb    2017-03-03 21:06:46 +0900 (5373899)
@@ -0,0 +1,8 @@
+class CreatePosts < GroongaClientModel::Migration
+  def change
+    create_table :posts do |t|
+      t.short_text :title
+      t.text :body
+    end
+  end
+end

  Added: test/apps/rails4/db/groonga/migrate/20170303120527_create_terms.rb (+7 -0) 100644
===================================================================
--- /dev/null
+++ test/apps/rails4/db/groonga/migrate/20170303120527_create_terms.rb    2017-03-03 21:06:46 +0900 (8027534)
@@ -0,0 +1,7 @@
+class CreateTerms < GroongaClientModel::Migration
+  def change
+    create_table :terms, propose: :full_text_search do |t|
+      t.index :posts, :body
+    end
+  end
+end

  Added: test/apps/rails4/db/groonga/migrate/20170303120536_create_ages.rb (+6 -0) 100644
===================================================================
--- /dev/null
+++ test/apps/rails4/db/groonga/migrate/20170303120536_create_ages.rb    2017-03-03 21:06:46 +0900 (22b513c)
@@ -0,0 +1,6 @@
+class CreateAges < GroongaClientModel::Migration
+  def change
+    create_table :ages, type: :hash_table, key_type: :uint32 do |t|
+    end
+  end
+end

  Deleted: test/apps/rails4/db/schema.grn (+0 -9) 100644
===================================================================
--- test/apps/rails4/db/schema.grn    2017-03-03 21:04:21 +0900 (aaf10e5)
+++ /dev/null
@@ -1,9 +0,0 @@
-table_create posts TABLE_NO_KEY
-
-column_create posts title COLUMN_SCALAR ShortText
-column_create posts body COLUMN_SCALAR Text
-
-table_create terms TABLE_PAT_KEY ShortText \
-  --default_tokenizer TokenBigram \
-  --normalizer NormalizerAuto
-column_create terms posts_body COLUMN_INDEX|WITH_POSITION posts body
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index