Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6857815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:04:39+00:00 2026-05-27T02:04:39+00:00

For play 1.x, we can use play evolutions:apply , How can I do it

  • 0

For play 1.x, we can use play evolutions:apply, How can I do it in play-2.0-beta?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:04:40+00:00Added an answer on May 27, 2026 at 2:04 am

    Evolution:apply is run automatically upon application start up. What is missing in Play 2.0-rc1 is a way to generate the evolutions scripts, and to manually apply them from the SBT console.

    But here is how to create them manually.

    Say you have the following definition in application.conf

    db.mydb.driver=org.h2.Driver
    db.mydb.url=jdbc:h2:mem:play
    

    Play2 will look for evolution in the following folder: application/db/evolutions/mydb/
    In this folder, evolutions shall be stored as sql file, using the evolution step as the file name.

    For instance:

    application/db/evolutions/mydb/1.sql
    application/db/evolutions/mydb/2.sql
    application/db/evolutions/mydb/3.sql
    

    Now the sql itself has the following structure:

    # --- !Ups
    create table company (
      id                        bigint not null,
      name                      varchar(255),
      constraint pk_company primary key (id));
    # --- !Downs
    drop table if exists company;
    

    !Ups are used to upgrade the model to the next evolutions
    !Downs are used to revert the !Ups

    Like I said in the intro, evolutions will be magically applied upon application startup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I use a <video> or <audio> tag to play a playlist, and to
I'd like to use C# to implement an application that can play multiple audio
So in Windows, you can use the PlaySound function to play an MP3 file
I realize that you can use SoundPlayer to play a sound in C#; however,
Does anyone know about the smallest Linux kernel I can use to play with?
I see that you can play ogg audio files, but I was wondering if
I just developed an iPhone audio streaming application...Now it can play audio files without
I want to make a simple game so that I can play against my
I want to build a component, where the user can play a video in
Hey i want to develop a player on Android, which can play streaming audio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.