Drop table if needed
Closed this issue · 1 comments
AtulDwivedi commented
If tables are already existing and need to be deleted while deploying the application in order to simulate client like application start-up process then drop the existing tables.
- Have a context param in
web.xml
- Read it in
ContextListener
- If tables need to be dropped as per the parameter, have a method in
SchemaDaoImpl
to drop the tables
Tables to be dropped must be application table
Dropping should happen before table creation
AtulDwivedi commented
- Added context param in
web.xml
- Reading the same in
ContextListener
and callingSchemaDaoImpl.dropTables
- In
SchemaDaoImpl.dropTables
-- Fetching all DB tables
-- Application tables fromh2.sql
file
-- If application table exists in DB then dropping the same