From c836e27750515301e68eb3f344efb4847941df06 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Oct 2013 17:49:27 -0500 Subject: [PATCH] Enable persistence of the task data Enable h2 database Create initial evolution for tasks table --- conf/application.conf | 4 ++-- conf/evolutions/default/1.sql | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 conf/evolutions/default/1.sql diff --git a/conf/application.conf b/conf/application.conf index fef0ef3..7288d2e 100644 --- a/conf/application.conf +++ b/conf/application.conf @@ -33,8 +33,8 @@ application.langs="en" # You can declare as many datasources as you want. # By convention, the default datasource is named `default` # -# db.default.driver=org.h2.Driver -# db.default.url="jdbc:h2:mem:play" +db.default.driver=org.h2.Driver +db.default.url="jdbc:h2:mem:play" # db.default.user=sa # db.default.password="" diff --git a/conf/evolutions/default/1.sql b/conf/evolutions/default/1.sql new file mode 100644 index 0000000..b83c199 --- /dev/null +++ b/conf/evolutions/default/1.sql @@ -0,0 +1,14 @@ +# Tasks schema + +# --- !Ups + +CREATE SEQUENCE task_id_seq; +CREATE TABLE task ( + id integer NOT NULL DEFAULT nextval('task_id_seq'), + label varchar(255) +); + +# --- !Downs + +DROP TABLE task; +DROP SEQUENCE task_id_seq;