-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/blog posts migration #186
Conversation
@@ -44,6 +45,8 @@ defmodule Pescarte.Identidades.Models.Usuario do | |||
|
|||
belongs_to :contato, Contato, type: :string | |||
|
|||
has_many :posts, Post |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o has_many
, belongs_to
e mnay_to_many
to ecto assumem que o campo ID de ambas as tabelas são do tipo inteiro (sequencial), então é necessário dizer que o campo ID vai ser do tipo string (aka nano id no nosso caso), com a opção type: :string
, como feito na linha 46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
o has_many não aceita o type: string
da mesma forma que tem como fazer com o belongs_to
, estou buscando na doc uma outra maneira de especificar o tipo do id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm é vdd. creio que só o belongs_to que aceite, sendo assim lá na tabela de tags tem que mudar (acabei d e fazer merge na main)
…arated crud archive
2b029ac
to
5ef74d4
Compare
* main: fix: conflict Feat/pgtr (#195) Feat/landing new (#194) fix: correct agenda title to display month dynamically from CSV data (#198) Feat/footer fixed (#197) Feat/blog posts migration (#186) fix: correct receiver and sender email addresses and generate confirmation email (#193) Feat/blog tag schema (#185) Fix/membros (#192) feat: correctly redirects to landing page after sending email contact fix: correctly start finch adapter for tesla (resend uses it :clown:) oh my god... (#191) Feat/equipes images (#187) wip: adjust table columns and data display (#189) Feat/cards landing (#188) fix: add route to contact form on landing page feat: introduce Result monad type feat: implement design system primitives feat/contato (#182) Belarba/criar entidade nomes comuns de peixe (#172)
Descrição
PR feito para implementar os post no Blog/notícias.
Pontos para atenção
Possui migrations?