Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

567
Visualizações
Postgres and alembic - Assuming SERIAL sequence

I have a postgres DB, which I manage through SQLAlchemy and alembic (for migrations). When creating a DB migration through alembic, I get the following INFO in the console.

INFO  [alembic.ddl.postgresql] Detected sequence named 'my_table_name_id_seq' as owned by integer column 'my_table_name(id)', assuming SERIAL and omitting

My model looks like

class CopyJob(db.Model):
    __tablename__ = "my_table_name"

    id = db.Column(db.Integer, primary_key=True, autoincrement=True)

I interpret the above as a warning. One line is generated for each of my tables. I have two questions:

  • Am I doing something wrong when getting the warning above
  • What should I fix / explicitly set, in order to make it go away. Migrations are too verbose.

Thank you!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

After digging a bit into alembic code it doesn't look like a warning. Alembic just informs that the sequence it checks turns out to be a SERIAL. Therefore, there's no point in trying to somehow fix the issue. If the message bothers you, you can increase the log level to WARNING as was suggested in the comments, otherwise, there seems to be no workaround.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda