Made changes to generate-sql. Do not understand how we copy from
generated-sources to /src/main/resources but the generation has fixed all of the same bugs that were manually fixed in /src/main/resources including the preferred approach, drop contraints for postgresql.
This commit is contained in:
committed by
Michael Minella
parent
81526f77ac
commit
4beba53220
7
spring-batch-core/src/main/sql/drop.constraints.sql.vpp
Normal file
7
spring-batch-core/src/main/sql/drop.constraints.sql.vpp
Normal file
@@ -0,0 +1,7 @@
|
||||
ALTER TABLE BATCH_JOB_INSTANCE DROP CONSTRAINT ${IFEXISTSBEFORE} JOB_INST_UN;
|
||||
ALTER TABLE BATCH_JOB_EXECUTION DROP CONSTRAINT ${IFEXISTSBEFORE} JOB_INST_EXEC_FK;
|
||||
ALTER TABLE BATCH_JOB_EXECUTION_PARAMS DROP CONSTRAINT ${IFEXISTSBEFORE} JOB_EXEC_PARAMS_FK;
|
||||
ALTER TABLE BATCH_STEP_EXECUTION DROP CONSTRAINT ${IFEXISTSBEFORE} JOB_EXEC_STEP_FK;
|
||||
ALTER TABLE BATCH_STEP_EXECUTION_CONTEXT DROP CONSTRAINT ${IFEXISTSBEFORE} STEP_EXEC_CTX_FK;
|
||||
ALTER TABLE BATCH_JOB_EXECUTION_CONTEXT DROP CONSTRAINT ${IFEXISTSBEFORE} JOB_EXEC_CTX_FK;
|
||||
|
||||
@@ -3,6 +3,7 @@ platform=postgresql
|
||||
BIGINT = BIGINT
|
||||
IDENTITY =
|
||||
GENERATED =
|
||||
IFEXISTSBEFORE = IF EXISTS
|
||||
DOUBLE = DOUBLE PRECISION
|
||||
BLOB = BYTEA
|
||||
CLOB = TEXT
|
||||
|
||||
13
spring-batch-core/src/main/sql/sqlf.properties
Normal file
13
spring-batch-core/src/main/sql/sqlf.properties
Normal file
@@ -0,0 +1,13 @@
|
||||
platform=sqlfire
|
||||
# SQL language oddities (cloned from Derby)
|
||||
BIGINT = BIGINT
|
||||
IDENTITY =
|
||||
GENERATED = GENERATED BY DEFAULT AS IDENTITY
|
||||
IFEXISTSBEFORE = IF EXISTS
|
||||
DOUBLE = DOUBLE PRECISION
|
||||
BLOB = BLOB
|
||||
CLOB = CLOB
|
||||
TIMESTAMP = TIMESTAMP
|
||||
VARCHAR = VARCHAR
|
||||
# for generating drop statements...
|
||||
SEQUENCE = TABLE
|
||||
3
spring-batch-core/src/main/sql/sqlf.vpp
Normal file
3
spring-batch-core/src/main/sql/sqlf.vpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1));
|
||||
#end
|
||||
#macro (notnull $name $type)ALTER COLUMN ${name} NOT NULL#end
|
||||
Reference in New Issue
Block a user