Notice: Undefined index: HTTP_ACCEPT_ENCODING in C:\server\web\www.showyounger.com\s-system.php on line 2
dbdeploy | 小样儿(ShowYounger)
小样儿,顶呱呱!!![http://www.showyounger.com]
http://dbdeploy.com/
- <?xml version="1.0" encoding="UTF-8"?>
-
- <project name="dbdeploy_tt" default="default">
- <property name="db.driver" value="com.mysql.jdbc.Driver" />
- <property name="db.url" value="jdbc:mysql://192.168.0.36:3306/webmanage?characterEncoding=utf8" />
- <property name="db.user" value="root" />
- <property name="db.password" value="" />
- <property name="db.path" value="." />
- <property name="dbdeploy_home" value="D:\program\dbdeploy-3.0M3\" />
- <path id="mysql.classpath">
- <fileset dir="${dbdeploy_home}">
- <include name="core/mysql-connector-java-5.1.11-bin.jar"/>
- </fileset>
- </path>
- <path id="dbdeploy.classpath">
-
- <fileset dir="${dbdeploy_home}">
- <include name="core/dbdeploy-ant-*.jar"/>
- </fileset>
-
- <path refid="mysql.classpath" />
- </path>
-
- <taskdef name="dbdeploy" classname="com.dbdeploy.AntTarget" classpathref="dbdeploy.classpath"/>
-
- <target name="default" depends="update-step"/>
-
- <target name="init" depends="create-changelog-table" description="初始化(create-changelog-table)"/>
-
- <target name="create-changelog-table" description="建changelog">
- <sql driver="${db.driver}" url="${db.url}" userid="${db.user}" password="${db.password}" classpathref="mysql.classpath" >
- <fileset file="${dbdeploy_home}core/createSchemaVersionTable.mysql.sql"/>
- </sql>
- </target>
-
- <target name="update" description="直接执行">
-
- <!-- if you don't specify an output file, dbdeploy will apply the changes for you
- you may need to specify delimiter and delimitertype for your scripts to be split properly - these
- work the same as in the ant sql task, see http://ant.apache.org/manual/CoreTasks/sql.html
- -->
- <dbdeploy driver="${db.driver}" url="${db.url}"
- userid="${db.user}"
- password="${db.password}"
- dir="${db.path}"
- />
-
- </target>
-
- <target name="update-step" description="生成前进,后退文件,并执行">
-
-
- <dbdeploy driver="${db.driver}" url="${db.url}"
- userid="${db.user}"
- password="${db.password}"
- dir="${db.path}"
- outputfile="output.sql"
- undoOutputfile="undo.sql"
- dbms="mysql"
- />
-
-
- <sql driver="${db.driver}" url="${db.url}" encoding="utf-8"
- userid="${db.user}" password="${db.password}" classpathref="mysql.classpath">
- <fileset file="output.sql"/>
- </sql>
-
- </target>
-
- <target name="undo" description="执行undo">
- <sql driver="${db.driver}" url="${db.url}" encoding="utf-8"
- userid="${db.user}" password="${db.password}" classpathref="mysql.classpath">
- <fileset file="undo.sql"/>
- </sql>
- </target>
-
- <target name="redo" description="执行output.sql">
- <sql driver="${db.driver}" url="${db.url}" encoding="utf-8"
- userid="${db.user}" password="${db.password}" classpathref="mysql.classpath">
- <fileset file="output.sql"/>
- </sql>
- </target>
-
- <target name="showlog" description="执行sql">
- <sql driver="${db.driver}" url="${db.url}" encoding="utf-8"
- userid="${db.user}" password="${db.password}" print="true" classpathref="mysql.classpath">
- select * from changelog;
- </sql>
- </target>
-
- </project>