dwyl / mvp

📲 simplest version of the @dwyl app
https://mvp.fly.dev
GNU General Public License v2.0
87 stars 2 forks source link

PR: Create migration to change `item.text` type from `string` to `text` #205

Closed SimonLab closed 1 year ago

SimonLab commented 1 year ago

Update type for item's text ref: #204

nelsonic commented 1 year ago

Does this line also need to be updated: ?

https://github.com/dwyl/mvp/blob/f5bd6f1880378260091de62fa7528f8753649cb9/lib/app/item.ex#L10

codecov[bot] commented 1 year ago

Codecov Report

Merging #205 (12007de) into main (f5bd6f1) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #205   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          221       221           
=========================================
  Hits           221       221           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

SimonLab commented 1 year ago

Does this line also need to be updated: ?

No the schema doesn't have the text type:

https://hexdocs.pm/ecto/Ecto.Schema.html#module-primitive-types

Ecto type may support multiple database types. For example, all of :varchar, :text, :bytea, etc.

nelsonic commented 1 year ago

Right, so Ecto doesn't differentiate between String and Text but the underlying Postgres Table/Column does. 👌