Skip to content

Commit

Permalink
[#1747] Use clob datatype for Evolutions table (or specify your own)
Browse files Browse the repository at this point in the history
Used text data type can be set via "evolution.PLAY_EVOLUTIONS.textType"
  • Loading branch information
mkurz authored and Notalifeform committed Nov 8, 2013
1 parent b0bf108 commit 2781512
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions documentation/manual/configuration.textile
Expand Up @@ -361,6 +361,7 @@ bc. evolutions.enabled=false
Default: @true@



h3(#modules.evolutions.enabled). modules.evolutions.enabled

Used to disable "database evolutions":evolutions from all modules
Expand All @@ -377,6 +378,13 @@ bc. [module name].evolutions.enabled=false

Default: @true@

h3(#evolution.PLAY_EVOLUTIONS.textType). evolution.PLAY_EVOLUTIONS.textType

If you are having problems with the default datatype text (clob for Oracle), you can specify your own datatype

bc. evolution.PLAY_EVOLUTIONS.textType=clob

Default: @clob@

h2(#test). Test runner

Expand Down
2 changes: 1 addition & 1 deletion framework/src/play/db/Evolutions.java
Expand Up @@ -571,7 +571,7 @@ public synchronized static Stack<Evolution> listDatabaseEvolutions(String module
}
}

execute("create table play_evolutions (id int not null, hash varchar(255) not null, applied_at timestamp not null, apply_script text, revert_script text, state varchar(255), last_problem text, module_key varchar(255), constraint pk_id_module_key primary key (id, module_key))");
execute("create table play_evolutions (id int not null, hash varchar(255) not null, applied_at timestamp not null, apply_script " + textDataType + ", revert_script " + textDataType + ", state varchar(255), last_problem " + textDataType + ", module_key varchar(255), constraint pk_id_module_key primary key (id, module_key))");
}
} catch (SQLException e) {
Logger.error(e, "SQL error while checking play evolutions");
Expand Down

0 comments on commit 2781512

Please sign in to comment.