@@ -17,9 +17,7 @@ defmodule Ecto.Adapters.SQLite3.DataType do
1717 def column_type ( :string , _opts ) , do: "TEXT"
1818 def column_type ( :float , _opts ) , do: "NUMERIC"
1919 def column_type ( :binary , _opts ) , do: "BLOB"
20- def column_type ( :map , _opts ) , do: "TEXT"
2120 def column_type ( :array , _opts ) , do: "TEXT"
22- def column_type ( { :map , _ } , _opts ) , do: "TEXT"
2321 def column_type ( { :array , _ } , _opts ) , do: "TEXT"
2422 def column_type ( :date , _opts ) , do: "TEXT"
2523 def column_type ( :utc_datetime , _opts ) , do: "TEXT"
@@ -50,6 +48,20 @@ defmodule Ecto.Adapters.SQLite3.DataType do
5048 end
5149 end
5250
51+ def column_type ( :map , _opts ) do
52+ case Application . get_env ( :ecto_sqlite3 , :map_type , :string ) do
53+ :string -> "TEXT"
54+ :binary -> "BLOB"
55+ end
56+ end
57+
58+ def column_type ( { :map , _ } , _opts ) do
59+ case Application . get_env ( :ecto_sqlite3 , :map_type , :string ) do
60+ :string -> "TEXT"
61+ :binary -> "BLOB"
62+ end
63+ end
64+
5365 def column_type ( :uuid , _opts ) do
5466 case Application . get_env ( :ecto_sqlite3 , :uuid_type , :string ) do
5567 :string -> "TEXT"
0 commit comments