Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

363
Views
play framewok postgresql: la base de datos 'predeterminada' necesita evolución

implementé mi aplicación muy simple en heroku siguiendo los tutoriales

funciona bien en mi host local cuando lo ejecuto con sbt run pero falla en heroku.

aquí está mi 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;

registro de heroku:

 padDefaultDBApi - Database [default] connected at jdbc:postgresql://... !!! WARNING! This script contains DOWNS evolutions that are likely destructive [warn] padeApplicationEvolutions - 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] padeApplicationEvolutions - 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!

y también agregué play.evolutions.db.default.autoApply=true al final de mi application.conf

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Corre con

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

y

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

Si desea ejecutarlos automáticamente, incluidas las bajas (tenga cuidado, especialmente si sus evoluciones hacia abajo eliminan datos existentes).

Puede configurarlos ejecutando:

 heroku config:set JAVA_OPTS="-Dplay.evolutions.db.default.autoApply=true -Dplay.evolutions.db.default.autoApplyDowns=true"
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!