ERROR: relation "SAMPLE.CODE_MASTER" does not exist
dkarigithu opened this issue · 1 comments
dkarigithu commented
Cloned your repo fresh, keep getting the aforementioned error when using Postgres. Guide only illustrates using h2, any caveats for Postgres?
yugolf commented
I'm sorry, I was going to extend function to using "CODE_MASTER" table, but the application don't use now. You need delete the logic which accesses to "CODE_MASTER" as the following.
Global.scala(default package)
import play.api._
import play.cache.Cache
//import daos.common.CodeMasters <--- here
object Global extends GlobalSettings {
override def onStart(app: Application) {
Logger.info("Application has started")
//Cache.set("codeMasters", CodeMasters.getCodeMaster) <--- here
}
override def onStop(app: Application) {
Logger.info("Application shutdown...")
//Cache.remove("codeMasters") <--- here
}
}
Or, you need create "CODE_MASTER".
If you create it, you can use the following DDL.
DDL for creating CODE_MASTER
CREATE TABLE "CODE_MASTER"
(
"CODEGRP_NO" character varying(128) NOT NULL,
"CODE_VALUE" character varying(128) NOT NULL,
"CODEGRP_NM" character varying(256) NOT NULL,
"CODE_NM" character varying(256) NOT NULL,
"CODE_NM_JA" character varying(256),
"CODE_NM_EN" character varying(256),
"CODE_NM_ZH_CN" character varying(256),
"CODE_NM_ZH_TW" character varying(256),
"CODE_NM_ZH_HK" character varying(256),
"EXTEND_CODE_NM" character varying(256),
"SORT_NO" numeric(3,0) NOT NULL,
"PARENT_CODEGRP_NO" character varying(128),
"PARENT_CODE_VALUE" character varying(128),
"INSERT_USER_ID" character varying(128) NOT NULL,
"INSERT_PG_ID" character varying(128) NOT NULL,
"INSERT_DATE" timestamp without time zone NOT NULL DEFAULT ('now'::text)::date,
"UPDATE_USER_ID" character varying(128) NOT NULL,
"UPDATE_PG_ID" character varying(128) NOT NULL,
"UPDATE_DATE" timestamp without time zone NOT NULL DEFAULT ('now'::text)::date,
"VERSION_NO" integer NOT NULL DEFAULT 1,
CONSTRAINT "CODE_MASTER_pkey" PRIMARY KEY ("CODEGRP_NO", "CODE_VALUE")
)