Play! frameworkでProduction時のjpa.ddlは"none"にした方がいいと思う

Play! frameworkTutorialにある、Preparing for productionにおいて、jpa.ddlは"create"に設定しておくと、「データベースにテーブルが存在しない場合は、作成される」と書いてあります。

We will now tweak the way Hibernate manages the database schema for us. It’s very useful when hibernate automatically updates the database schema as the Java model objects change. However it’s kind of unpredictable, and running magical things on a production database is never a good thing. So we will let Hibernate create the database schema if it doesn’t exist, but it will never update it automatically.

Change the jpa.ddl configuration key:

%server01.jpa.ddl=create

最初これを信じていて、「play start」する度にテーブルが作成されるので私がなんかおかしい事やったのかと思ったのですが。ついでに、Play!のソースまで見ちゃったりして、application.confのjpa.ddlが実際にどこで使われているのか調べたり。

play/framework/src/play/db/jpa/JPAPlugin.java (play-1.0-r645, 41行目〜)

Ejb3Configuration cfg = new Ejb3Configuration();
cfg.setDataSource(DB.datasource);
if (!Play.configuration.getProperty("jpa.ddl", "update").equals("none")) {
    cfg.setProperty("hibernate.hbm2ddl.auto", Play.configuration.getProperty("jpa.ddl", "update"));
}

application.confのjpa.ddlは、hibernate.hbm2ddl.autoに設定されることがわかったのですが、どうも"create-drop"と"create"の挙動が同じになっているような気がしてならない。hibernateの問題なのか、これ以上、深く調べませんが、とりえあえずPlay Frameworkのconf/application.confでjpa.ddlは"none"でいいかなと。

むー...