我已经尝试过几次遵循Sqitch 的“ postgres 教程”,只是CREATE OR REPLACE FUNCTION
我没有更改函数(使用 ),而是更改表中的字段名称以查看部署后它将如何锻炼。但它最终会出现以下错误。有人可以指出我正确的方向吗?
$ sqitch verify
Verifying sqtest_db
* appschema .... ok
* contact ...... ok
Undeployed change:
* contact
Verify successful
$ sqitch deploy
Deploying changes to sqtest_db
+ contact .. psql:deploy/contact.sql:10: ERROR: relation "contact" already exists
not ok
"/usr/local/bin/psql" unexpectedly returned exit value 3
Deploy failed
这是我部署tagged
前后的查询tagged
在标记数据库之前
BEGIN;
CREATE TABLE sq_schema.contact
(
log_date DATE NOT NULL,
emp_name CHARACTER VARYING(100) DEFAULT ''
);
COMMIT;
标记数据库
sqitch rework contact --requires appschema -n 'Added CONTACT table'
标记后
BEGIN;
CREATE TABLE sq_schema.contact
(
log_date DATE NOT NULL,
-- Change field name,
employee_name CHARACTER VARYING(100) DEFAULT ''
);
COMMIT;