다음 문제가 발생합니다.
ArgumentError{message: \"query %Postgrex.Query{columns: ["id", "name", "internal", "inserted_at", "updated_at"], name: "ecto_616034", param_formats: [:binary], param_oids: [25], param_types: [Postgrex.Extensions.Raw], ref: #Reference<0.0.1.107309>, result_formats: [:binary, :binary, :binary, :binary, :binary], result_oids: [23, 1043, 16, 1184, 1184], result_types: [Postgrex.Extensions.Int4, Postgrex.Extensions.Raw, Postgrex.Extensions.Bool, Ecto.Adapters.Postgres.TimestampTZ, Ecto.Adapters.Postgres.TimestampTZ], statement: "SELECT r0.\"id\", r0.\"name\", r0.\"internal\", r0.\"inserted_at\", r0.\"updated_at\" FROM \"roles\" AS r0 WHERE (r0.\"name\" = $1)", types: {Ecto.Adapters.Postgres.TypeModule, 35356751}} has invalid types for the connection\"}", status: "error"}
내 모델 스키마는 다음과 같이 정의됩니다.
schema "roles" do
field :name, :string
field :internal, :boolean
many_to_many :user_organizations, User.Models.UserOrganization, join_through: "roles_users_organizations"
many_to_many :sessions, User.Models.Session, join_through: "roles_sessions"
timestamps()
end
테스트가 내 로컬 컴퓨터에서 정상적으로 실행되고 있지만 semaphoreci에서 매번 발생합니다. 동일한 결과를 가진 "postgres"이미지로 이미 시도한 "postgis"이미지와 함께 docker-compose를 사용하고 있습니다.
어떤 제안이라도 대단히 감사합니다.
감사!
한 프로젝트의 seed.exs 파일이 우산 앱의 다른 앱에 대한 Repo 모듈을 실수로 호출하는 우산 앱에서 이런 일이 발생했습니다.
그래서,
cat app1/priv/repo/seeds.exs
### Using The right Repo module ###
App1.Stuffs.query_stuff()
|> App1.Repo.one() # <== Should look like this -- Use App1.Repo module
### Using the wrong Repo module ###
App1.ThingStuffs.query_things()
|> App2.Repo.one() # <== this was causing this error for me
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다