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

366
Visualizações
play framewok postgresql : Database 'default' needs evolution

i deployed my very simple app in heroku by following tutorials

it works well in my localhost when i run it by sbt run but it crashes on heroku!

here is my 1.sql:

# --- !Ups

create table contact (
  id                            SERIAL UNIQUE,
  name                          varchar(255),
  email                         varchar(255),
  phone                         varchar(255),
  constraint pk_contact primary key (id)
);
create sequence contact_seq;


# --- !Downs

drop table if exists contact;
drop sequence if exists contact_seq;

heroku's log:

p.a.d.DefaultDBApi - Database [default] connected at jdbc:postgresql://...


!!! WARNING! This script contains DOWNS evolutions that are likely destructive
 [warn] p.a.d.e.ApplicationEvolutions - Your production database [default] needs evolutions, including downs!

drop table if exists contact;
 # --- Rev:1,Downs - a56ada6
 name                          varchar(255),
 drop sequence if exists contact_seq;
 email                         varchar(255), phone                         varchar(255),
# --- Rev:1,Ups - 53110fe
 create table contact (
 );
 id                            SERIAL UNIQUE,
 constraint pk_contact primary key (id)
 create sequence contact_seq;

 [warn] p.a.d.e.ApplicationEvolutions - Run with -Dplay.evolutions.db.default.autoApply=true and -Dplay.evolutions.db.default.autoApplyDowns=true if you want to run them automatically, including downs (be careful, especially if your down evolutions drop existing data)
 [info] application - ApplicationTimer demo: Starting application at 2017-04-28T08:59:05.048Z
 Oops, cannot start the server.
 @73o5pe90c: Database 'default' needs evolution!

and i also added play.evolutions.db.default.autoApply=true at end of my aplication.conf

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

0

Run with

 -Dplay.evolutions.db.default.autoApply=true 

and

 -Dplay.evolutions.db.default.autoApplyDowns=true 

If you want to run them automatically, including downs (be careful, especially if your down evolutions drop existing data).

You can set these by running:

heroku config:set JAVA_OPTS="-Dplay.evolutions.db.default.autoApply=true -Dplay.evolutions.db.default.autoApplyDowns=true"
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