79350994

Date: 2025-01-13 01:20:57
Score: 1
Natty:
Report link

For anyone interested, the solution was actually quite simple, basically, I added the sql command as my friend Erwin suggested.

def upgrade() -> None: op.execute("ALTER TABLE aluno ALTER COLUMN serie_aluno TYPE integer USING serie_aluno::text::int, ADD CONSTRAINT serie_aluno_serie_fkey FOREIGN KEY (serie_aluno) REFERENCES serie(id_serie);")

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: jaspionU2