* split model by table
* split seed data by table * updated with 3.1.3 changes
This commit is contained in:
parent
341f959711
commit
d34a819c32
|
@ -53,8 +53,8 @@
|
||||||
<target name="writeSchemaToDb">
|
<target name="writeSchemaToDb">
|
||||||
<ddlToDatabase validatexml="false" usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
<ddlToDatabase validatexml="false" usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
||||||
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
||||||
<fileset dir="..">
|
<fileset dir="../model">
|
||||||
<include name="${schemafiles}" />
|
<include name="**/*.xml" />
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<writeschematodatabase alterdatabase="${alterdatabase}" dodrops="true" failonerror="false" />
|
<writeschematodatabase alterdatabase="${alterdatabase}" dodrops="true" failonerror="false" />
|
||||||
|
@ -64,8 +64,8 @@
|
||||||
<target name="writeSchemaSqlToFile">
|
<target name="writeSchemaSqlToFile">
|
||||||
<ddlToDatabase validatexml="false" usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
<ddlToDatabase validatexml="false" usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
||||||
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
||||||
<fileset dir="..">
|
<fileset dir="../model">
|
||||||
<include name="${schemafiles}" />
|
<include name="**/*.xml" />
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<writeschemasqltofile alterdatabase="${alterdatabase}" dodrops="false" failonerror="false" createtables="true" createforeignkeys="false" outputfile="${sqloutputfile}" />
|
<writeschemasqltofile alterdatabase="${alterdatabase}" dodrops="false" failonerror="false" createtables="true" createforeignkeys="false" outputfile="${sqloutputfile}" />
|
||||||
|
@ -75,8 +75,8 @@
|
||||||
<target name="writeFkSqlToFile">
|
<target name="writeFkSqlToFile">
|
||||||
<ddlToDatabase validatexml="false" usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
<ddlToDatabase validatexml="false" usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
||||||
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
||||||
<fileset dir="..">
|
<fileset dir="../model">
|
||||||
<include name="${schemafiles}" />
|
<include name="**/*.xml" />
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<writeschemasqltofile alterdatabase="${alterdatabase}" dodrops="false" failonerror="false" createtables="false" createforeignkeys="true" outputfile="${fkoutputfile}" />
|
<writeschemasqltofile alterdatabase="${alterdatabase}" dodrops="false" failonerror="false" createtables="false" createforeignkeys="true" outputfile="${fkoutputfile}" />
|
||||||
|
@ -99,13 +99,39 @@
|
||||||
|
|
||||||
|
|
||||||
<target name="writeDataToDb">
|
<target name="writeDataToDb">
|
||||||
|
<ddlToDatabase usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
||||||
|
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
||||||
|
<fileset dir="../model">
|
||||||
|
<include name="**/*.xml" />
|
||||||
|
</fileset>
|
||||||
|
|
||||||
|
<writedatatodatabase usebatchmode="true" batchSize="20" ensureForeignKeyOrder="false" >
|
||||||
|
<fileset dir="../data">
|
||||||
|
<include name="**/*.xml" />
|
||||||
|
</fileset>
|
||||||
|
</writedatatodatabase>
|
||||||
|
</ddlToDatabase>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="splitSchemaFileByTable">
|
||||||
<ddlToDatabase usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
<ddlToDatabase usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
||||||
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
||||||
<fileset dir="..">
|
<fileset dir="..">
|
||||||
<include name="${schemafiles}" />
|
<include name="${schemafiles}" />
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<writedatatodatabase datafile="${datafile}" usebatchmode="true" batchSize="20" ensureForeignKeyOrder="false" />
|
<splitSchemaFileByTable destination="../model"/>
|
||||||
|
</ddlToDatabase>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="splitDataFileByTable">
|
||||||
|
<ddlToDatabase usedelimitedsqlidentifiers="${delimitedsqlidentifiers}" catalogpattern="${catalogpattern}" schemapattern="${schemapattern}" databasetype="${platform}">
|
||||||
|
<database driverclassname="${datasource.driverClassName}" url="${datasource.url}" username="${datasource.username}" password="${datasource.password}" />
|
||||||
|
<fileset dir="../model">
|
||||||
|
<include name="**/*.xml" />
|
||||||
|
</fileset>
|
||||||
|
|
||||||
|
<splitDataFileByTable destination="../data" datafile="${datafile}"/>
|
||||||
</ddlToDatabase>
|
</ddlToDatabase>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -36,9 +36,7 @@
|
||||||
</target>
|
</target>
|
||||||
<target name="load-data">
|
<target name="load-data">
|
||||||
<echo message="----- Loading Adempiere Seed data -----" />
|
<echo message="----- Loading Adempiere Seed data -----" />
|
||||||
<unjar src="../adempiere-data.jar" dest=".." />
|
|
||||||
<ant antfile="build-ddl.xml" target="writeDataToDb" />
|
<ant antfile="build-ddl.xml" target="writeDataToDb" />
|
||||||
<delete file="../adempiere-data.xml" />
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="load-functions">
|
<target name="load-functions">
|
||||||
|
|
|
@ -31,4 +31,6 @@ datasource.password=adempiere1
|
||||||
# additional properties for the pooling datasource:
|
# additional properties for the pooling datasource:
|
||||||
#datasource.dataSourceName=pooling datasource
|
#datasource.dataSourceName=pooling datasource
|
||||||
#datasource.initialConnections=5
|
#datasource.initialConnections=5
|
||||||
#datasource.maxConnections=20
|
#datasource.maxConnections=20
|
||||||
|
|
||||||
|
ddlutils.schema=adempiere
|
Loading…
Reference in New Issue