From 5de458c2d77d55709afbb301fb3174e077ca41e0 Mon Sep 17 00:00:00 2001 From: Wayne Lund Date: Mon, 6 May 2013 15:31:54 -0700 Subject: [PATCH] 1) Removed the drop constraints as the caused the script to fail on a greenfield database and proved to not be needed. 2) Fixed the vpp files for a typo on the sqlf platform name (sqlf instead of sqlfire) and dropping the constraints. However, the code generation has not been tested. --- .../springframework/batch/core/schema-drop-postgresql.sql | 7 ------- spring-batch-core/src/main/sql/postgresql.vpp | 2 -- spring-batch-core/src/main/sql/sqlf.properties | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-drop-postgresql.sql b/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-drop-postgresql.sql index 96de64fa4..3253af008 100644 --- a/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-drop-postgresql.sql +++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-drop-postgresql.sql @@ -1,11 +1,4 @@ -- Autogenerated: do not edit this file -ALTER TABLE BATCH_JOB_INSTANCE DROP CONSTRAINT IF EXISTS JOB_INST_UN; -ALTER TABLE BATCH_JOB_EXECUTION DROP CONSTRAINT IF EXISTS JOB_INST_EXEC_FK; -ALTER TABLE BATCH_JOB_EXECUTION_PARAMS DROP CONSTRAINT IF EXISTS JOB_EXEC_PARAMS_FK; -ALTER TABLE BATCH_STEP_EXECUTION DROP CONSTRAINT IF EXISTS JOB_EXEC_STEP_FK; -ALTER TABLE BATCH_STEP_EXECUTION_CONTEXT DROP CONSTRAINT IF EXISTS STEP_EXEC_CTX_FK; -ALTER TABLE BATCH_JOB_EXECUTION_CONTEXT DROP CONSTRAINT IF EXISTS JOB_EXEC_CTX_FK; - DROP TABLE IF EXISTS BATCH_STEP_EXECUTION_CONTEXT; DROP TABLE IF EXISTS BATCH_JOB_EXECUTION_CONTEXT; DROP TABLE IF EXISTS BATCH_STEP_EXECUTION; diff --git a/spring-batch-core/src/main/sql/postgresql.vpp b/spring-batch-core/src/main/sql/postgresql.vpp index 3d0eebaf6..59986a65a 100644 --- a/spring-batch-core/src/main/sql/postgresql.vpp +++ b/spring-batch-core/src/main/sql/postgresql.vpp @@ -1,5 +1,3 @@ -#macro (alter $name $table $constraint) ALTER TABLE ${name} DROP CONSTRAINT IF EXISTS ${constraint}; -#end #macro (sequence $name $value)CREATE SEQUENCE ${name} MAXVALUE 9223372036854775807 NO CYCLE; #end #macro (notnull $name $type)ALTER COLUMN ${name} SET NOT NULL#end diff --git a/spring-batch-core/src/main/sql/sqlf.properties b/spring-batch-core/src/main/sql/sqlf.properties index ff40f7be0..8476a1649 100644 --- a/spring-batch-core/src/main/sql/sqlf.properties +++ b/spring-batch-core/src/main/sql/sqlf.properties @@ -1,4 +1,4 @@ -platform=sqlfire +platform=sqlf # SQL language oddities (cloned from Derby) BIGINT = BIGINT IDENTITY =