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

364
Views
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 answers
Answer question

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 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!