HHH-16223 Deprecate HBM2DDL_SCRIPTS_DROP_TARGET
This commit is contained in:
parent
a15eb53f6f
commit
755e78ba18
|
@ -1683,14 +1683,9 @@ public interface AvailableSettings {
|
|||
String HBM2DDL_SCRIPTS_CREATE_APPEND = "hibernate.hbm2ddl.schema-generation.script.append";
|
||||
|
||||
/**
|
||||
* For cases where the {@value #HBM2DDL_SCRIPTS_ACTION} value indicates that schema drop commands
|
||||
* should be written to DDL script file, {@value #HBM2DDL_SCRIPTS_DROP_TARGET} specifies either a
|
||||
* {@link java.io.Writer} configured for output of the DDL script or a string specifying the file
|
||||
* URL for the DDL script.
|
||||
*
|
||||
* @see #HBM2DDL_SCRIPTS_ACTION
|
||||
* @deprecated Migrate to {@link #JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET}
|
||||
*/
|
||||
@SuppressWarnings("JavaDoc")
|
||||
@Deprecated
|
||||
String HBM2DDL_SCRIPTS_DROP_TARGET = "javax.persistence.schema-generation.scripts.drop-target";
|
||||
|
||||
/**
|
||||
|
|
|
@ -690,7 +690,7 @@ public class DefaultCatalogAndSchemaTest {
|
|||
StringWriter writer = new StringWriter();
|
||||
settings.put( AvailableSettings.HBM2DDL_SCRIPTS_ACTION, action );
|
||||
settings.put( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET, writer );
|
||||
settings.put( AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET, writer );
|
||||
settings.put( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET, writer );
|
||||
|
||||
SchemaManagementToolCoordinator.process(
|
||||
metadata, serviceRegistry, settings, DelayedDropRegistryNotAvailableImpl.INSTANCE );
|
||||
|
|
|
@ -29,8 +29,8 @@ import org.junit.jupiter.api.BeforeEach;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.hibernate.cfg.AvailableSettings.HBM2DDL_SCRIPTS_ACTION;
|
||||
import static org.hibernate.cfg.AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET;
|
||||
import static org.hibernate.cfg.AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET;
|
||||
import static org.hibernate.cfg.AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
|
@ -46,7 +46,7 @@ public class SchemaCreateDropUtf8WithoutHbm2DdlCharsetNameTest {
|
|||
protected Map getConfig() {
|
||||
final Map<Object, Object> config = Environment.getProperties();
|
||||
config.put( JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET, createSchema.toPath() );
|
||||
config.put( HBM2DDL_SCRIPTS_DROP_TARGET, dropSchema.toPath() );
|
||||
config.put( JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET, dropSchema.toPath() );
|
||||
config.put( HBM2DDL_SCRIPTS_ACTION, "drop-and-create" );
|
||||
ArrayList<Class> classes = new ArrayList<Class>();
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ public class SchemaScriptFileGenerationFailureTest {
|
|||
|
||||
private Map getConfig() {
|
||||
final Map<Object, Object> config = Environment.getProperties();
|
||||
config.put( AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET, writer );
|
||||
config.put( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET, writer );
|
||||
config.put( AvailableSettings.HBM2DDL_SCRIPTS_ACTION, "drop-and-create" );
|
||||
config.put( AvailableSettings.HBM2DDL_HALT_ON_ERROR, "true" );
|
||||
ArrayList<Class> classes = new ArrayList<>();
|
||||
|
|
|
@ -109,7 +109,7 @@ public class SchemaScriptFileGenerationTest {
|
|||
private Map getConfig() {
|
||||
final Map<Object, Object> config = Environment.getProperties();
|
||||
config.put( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET, createSchema.toPath() );
|
||||
config.put( AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET, dropSchema.toPath() );
|
||||
config.put( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET, dropSchema.toPath() );
|
||||
config.put( AvailableSettings.HBM2DDL_SCRIPTS_ACTION, "drop-and-create" );
|
||||
ArrayList<Class> classes = new ArrayList<Class>();
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public class SchemaDropToOutputScriptTest {
|
|||
final StandardServiceRegistryBuilder standardServiceRegistryBuilder = new StandardServiceRegistryBuilder()
|
||||
.applySetting( Environment.FORMAT_SQL, "false" )
|
||||
.applySetting( Environment.HBM2DDL_SCRIPTS_ACTION, "drop" )
|
||||
.applySetting( AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET, output.getAbsolutePath() );
|
||||
.applySetting( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET, output.getAbsolutePath() );
|
||||
|
||||
if ( append != null ) {
|
||||
standardServiceRegistryBuilder.applySetting( AvailableSettings.HBM2DDL_SCRIPTS_CREATE_APPEND, append );
|
||||
|
|
|
@ -55,7 +55,7 @@ public class OrderSequenceGenerationTest extends BaseEnversJPAFunctionalTestCase
|
|||
protected void addConfigOptions(Map options) {
|
||||
super.addConfigOptions( options );
|
||||
options.put( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_CREATE_TARGET, createSchema.toPath() );
|
||||
options.put( AvailableSettings.HBM2DDL_SCRIPTS_DROP_TARGET, dropSchema.toPath() );
|
||||
options.put( AvailableSettings.JAKARTA_HBM2DDL_SCRIPTS_DROP_TARGET, dropSchema.toPath() );
|
||||
options.put( AvailableSettings.HBM2DDL_SCRIPTS_ACTION, "drop-and-create" );
|
||||
options.put( AvailableSettings.JAKARTA_HBM2DDL_DATABASE_ACTION, "create-drop" );
|
||||
options.put( AvailableSettings.HBM2DDL_AUTO, "create-drop" );
|
||||
|
|
Loading…
Reference in New Issue