Setting up Liquibase with MS-SQL Server

后端 未结 1 1710
挽巷
挽巷 2021-02-05 19:23

I am utilising Liquibase (www.liquibase.org) into our MVC3 SQL Server 2008 project to manage database migration/changes. However I\'m stumbling on the first hurdle: Connecting t

相关标签:
1条回答
  • 2021-02-05 19:43

    Create a properties file called liquibase.properties containing the following:

    classpath=C:\\Program Files\\Microsoft SQL Server 2005 JDBC Driver\\sqljdbc_1.2\\enu\\sqljdbc.jar
    driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
    url=jdbc:sqlserver://localhost:1433;databaseName=test
    username=myuser
    password=mypass
    changeLogFile=C:\\Temp\\ChangeLog.xml
    

    liquibase will use this file when located in the same directory. Useful to simplify the command-line.

    Database is updated as follows:

    liquibase update
    

    Notes:

    • I'm not a SQL server user, I picked up the JDBC driver and URL details from Microsoft doco
    • The "migrate" command has been deprecated.
    0 讨论(0)
提交回复
热议问题