{"comment":{"created_at":"2011-10-17T13:35:19Z","body":"@melezhik, in my testing, after the RENAME COLUMN, the yamltodb output is to DROP COLUMN c4, *not* cc4. Can you please confirm that is a typo on your part? Also, I think your last sentence should read \"which is wrong, because only drop column c4, but also has to create column cc4!\"","updated_at":"2011-10-17T13:35:19Z","url":"https://api.github.com/repos/jmafc/Pyrseas/issues/comments/2428803","id":2428803,"user":{"gravatar_id":"0d235d4094b8dbf2cd9932667d828795","avatar_url":"https://secure.gravatar.com/avatar/0d235d4094b8dbf2cd9932667d828795?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jmafc","id":558890,"login":"jmafc"}},"action":"created","issue":{"number":8,"created_at":"2011-10-17T11:03:48Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"`cat schema.yaml`\r\n\r\n        schema public:\r\n          description: standard public schema\r\n          table t1:\r\n            columns:\r\n            - c1:\r\n                not_null: true\r\n                type: integer\r\n            - c2:\r\n                type: smallint\r\n            - c3:\r\n                default: 'false'\r\n                type: boolean\r\n            - c4:\r\n                type: text\r\n            foreign_keys:\r\n              t1_c2_fkey:\r\n                columns:\r\n                - c2\r\n                references:\r\n                  columns:\r\n                  - c21\r\n                  schema: s1\r\n                  table: t2\r\n            primary_key:\r\n              t1_pkey:\r\n                access_method: btree\r\n                columns:\r\n                - c1\r\n        schema s1:\r\n          table t2:\r\n            columns:\r\n            - c21:\r\n                not_null: true\r\n                type: integer\r\n            - c22:\r\n                type: character varying(16)\r\n            primary_key:\r\n              t2_pkey:\r\n                access_method: btree\r\n                columns:\r\n                - c21\r\n\r\n---\r\n\r\n`yamltodb -H melezhik.x --user test -1 test  test.yml  | psql --user=test -h melezhik.x test`\r\n\r\n    BEGIN\r\n    CREATE SCHEMA\r\n    CREATE TABLE\r\n    CREATE TABLE\r\n    NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index \"t2_pkey\" for table \"t2\"\r\n    ALTER TABLE\r\n    NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index \"t1_pkey\" for table \"t1\"\r\n    ALTER TABLE \r\n    ALTER TABLE\r\n    COMMIT\r\n\r\n`alter table t1 rename column c4 to cc4;`\r\n`yamltodb -H melezhik.x --user test -1 test  test.yml`\r\n\r\n    BEGIN;\r\n    ALTER TABLE t1 DROP COLUMN cc4;\r\n    COMMIT;\r\n\r\nwhich is wrong, because only drop column cc4, but also has to create column c4!","comments":2,"title":"failed to rename columns","updated_at":"2011-10-17T13:35:19Z","url":"https://api.github.com/repos/jmafc/Pyrseas/issues/8","id":1927271,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"d63421f2bf9cb79b3c54df11430d8f6b","avatar_url":"https://secure.gravatar.com/avatar/d63421f2bf9cb79b3c54df11430d8f6b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/melezhik","id":988105,"login":"melezhik"},"html_url":"https://github.com/jmafc/Pyrseas/issues/8","labels":[],"state":"open"},"legacy":{"issue_id":1927271,"comment_id":2428803}}