py-mysql2pgsql icon indicating copy to clipboard operation
py-mysql2pgsql copied to clipboard

Feature Request: Comments

Open diemuzi opened this issue 10 years ago • 3 comments

I was curious if it would be possible to include support for table / column comments to be transferred?

If this is already supported, is there anything special I need to do to get those transferred?

diemuzi avatar Jun 22 '14 21:06 diemuzi

I think this was done at #55. You need to fetch latest sources from the repo to test.

kworr avatar Jun 27 '14 20:06 kworr

Aha, you're right. Tested and it appears it currently does not work. It actually only gets the comments for tables/columns which have no comments.

As a test I create a comment on 1 out of 2 columns listed in a table called a_new_perspective. I then ran the convert tool and had it export the data to a file and upon review of the file I do see a line like this:

COMMENT ON COLUMN a_new_perspective.test1 is '';

Once I removed the comment from the table I can now see this:

COMMENT ON COLUMN a_new_perspective.test1 is ''; COMMENT ON COLUMN a_new_perspective.test2 is '';

I expected to see the following:

COMMENT ON COLUMN a_new_perspective.test2 is 'SammieTest2';

So it does appear that the comments are attempting to be copied over, but only for those without comments. Quite the interesting...

diemuzi avatar Jun 27 '14 20:06 diemuzi

I just merged #63, can you try that again?

kworr avatar Aug 28 '14 08:08 kworr