Hi.
I first execute
./liquibase --driver=com.psql.jdbc.Driver </div>
--classpath=/opt/corp/prod/prodinstance/webapps/MYWEBAPP/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar </div>
--changeLogFile=/liquibase/changelog-1.xml </div>
--driver=org.postgresql.Driver </div>
--url=“jdbc:postgresql://localhost/testdb” </div>
--username=testuser </div>
--password=password </div>
update
I get
Liquibase Update Successful
And note that the databasechangeloglock has locked=t (a bit surprising)
If I then try to rerun the command (with the same or different changelog file) I get:
Liquibase Update Failed: ERROR: relation “databasechangelog” already exists
SEVERE 1/28/12 9:49 PM:liquibase: ERROR: relation “databasechangelog” already exists
liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE databasechangelog (ID VARCHAR(63) NOT NULL, AUTHOR VARCHAR(63) NOT NULL, FILENAME VARCHAR(200) NOT NULL, DATEEXECUTED TIMESTAMP WITH TIME ZONE NOT NULL, ORDEREXECUTED INT NOT NULL, EXECTYPE VARCHAR(10) NOT NULL, MD5SUM VARCHAR(35), DESCRIPTION VARCHAR(255), COMMENTS VARCHAR(255), TAG VARCHAR(255), LIQUIBASE VARCHAR(20), CONSTRAINT PK_DATABASECHANGELOG PRIMARY KEY (ID, AUTHOR, FILENAME)): ERROR: relation “databasechangelog” already exists
(I tried this both with and without setting locked to false)
What am I doing wrong? I tried both using “update” and “migrate” (the latter is in the Quick Start example, but not otherwise documented).
job