Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Comments on Table / Columns #422

Closed
sqlalchemy-bot opened this issue Mar 17, 2017 · 18 comments
Closed

Support Comments on Table / Columns #422

sqlalchemy-bot opened this issue Mar 17, 2017 · 18 comments

Comments

@sqlalchemy-bot
Copy link

@sqlalchemy-bot sqlalchemy-bot commented Mar 17, 2017

Migrated issue, originally created by Brice Maron (@emerzh)

Hi,
it seems that sqlalchemy supports comments on objects
(https://bitbucket.org/zzzeek/sqlalchemy/issues/1546/feature-request-commenting-db-objects)
which is awesome!

it could be really cool if it can be integrated to alembic as well

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Mar 18, 2017

Michael Bayer (@zzzeek) wrote:

yeap....well that's SQLA 1.2 for a few months from now, should be an easy add to alembic...

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Mar 31, 2018

Brice Maron (@emerzh) wrote:

Hi,
know that SQLA 1.2 is release and becoming more stable (with the dot release) is there something new on this front ?

Thanks for your work :)

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 21, 2018

Changes by Michael Bayer (@zzzeek):

  • added labels: op directives
@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 21, 2018

Changes by Michael Bayer (@zzzeek):

  • set milestone to "tier 1"
@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 21, 2018

Michael Bayer (@zzzeek) wrote:

this impacts autogenerate, as far as rendering "comment" in Table/ Column objects. from there, there is the possiblity of allowing alterations of comments. but we should start w/ the autogenerate part because that is more obvious and simple.

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Apr 21, 2018

Changes by Michael Bayer (@zzzeek):

  • removed labels: op directives
  • added labels: autogenerate - rendering
@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Aug 31, 2018

Sebastian Wehrmann (@sweh) wrote:

Any news on this one? Do u need help with the implementation?

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Sep 2, 2018

Mike Waites (@mikeywaites) wrote:

Hi @sweh

I picked this up yesterday and have started working on it. I think i'm pretty much done however, Mike's away until Wednesday next week and there's a few things I need to run past him regarding my fix. I'll make sure I keep you posted

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Oct 22, 2018

Sebastian Wehrmann (@sweh) wrote:

Hi Mike,

any chance you can pass me a diff or link to the branch with your fix?

Thanks in advance,
Sebastian

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Oct 22, 2018

Michael Bayer (@zzzeek) wrote:

@sweh the work Mike was doing can be seen at mikeywaites/alembic#1

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Oct 23, 2018

Sebastian Wehrmann (@sweh) wrote:

Hi Michael,

thanks for the pointer to the github repository. I tried Mikes work and it works quite well so far, except for autogenerating the proper alter_column statements when adding comments to an existing table. Is this going to be implemented with this ticket?

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Oct 23, 2018

Michael Bayer (@zzzeek) wrote:

that's probably part of the plan, yes, as part of the compare_column routine

@sqlalchemy-bot
Copy link
Author

@sqlalchemy-bot sqlalchemy-bot commented Nov 16, 2018

Mike Waites (@mikeywaites) wrote:

Hi @sweh

Firstly apologies for taking so long on getting anywhere with this. I moved house across country right as i started working on this and it's taken me a while to get back into the swing of things. I just wanted to give you an update on where i'm at and let you know i've not stopped.

I took a slight detour to get some things set up to make it easier for myself and others to work with the various backends alembic/sqlalchemy projects support. Having done that I'll be spending some time to integrate my progress so far into the workflow @zzzeek uses so that we're all singing the same song.

I am pretty close to getting this finished I think so if you'd be happy to help test that would be a great help.

@TargetLiu
Copy link

@TargetLiu TargetLiu commented Dec 4, 2018

I need this feature very much, hope to publish soon, thx.

@zzzeek
Copy link
Member

@zzzeek zzzeek commented Dec 4, 2018

@TargetLiu the review is ongoing at https://gerrit.sqlalchemy.org/#/c/sqlalchemy/alembic/+/932/. what you can do to help is try out this patch (see "download" dropdown in upper right) and see what works and what doesn't. Then you can leave comments on the gerrit or even if you wanted to push fixes to this review I can give you access to do that. it takes a village !

@mikeywaites
Copy link
Contributor

@mikeywaites mikeywaites commented Dec 10, 2018

@TargetLiu @sweh

I'm really keen to get this wrapped up this week. I've been dragging this along for an age now. Could really appreciate some help testing if you have some time.

@mikeywaites
Copy link
Contributor

@mikeywaites mikeywaites commented Dec 11, 2018

@TargetLiu @sweh

Scrap that. I've missed a pretty big chunk of the autogenerate flow so i'll work on that today. The famous "works in unit tests" problem :)

Apologies for this taking so long, Now i'm starting to get my head around the code base the next tickets will hopefully come faster.

@sqla-tester
Copy link
Collaborator

@sqla-tester sqla-tester commented Dec 27, 2018

Mike Waites has proposed a fix for this issue in the master branch:

Implemented support for Table and Column Comments https://gerrit.sqlalchemy.org/932

vvvrrooomm pushed a commit to vvvrrooomm/alembic that referenced this issue Jan 10, 2019
Added Table and Column level comments for supported backends.
`create_table`, `add_column` and `alter_column` now optionally
take  `comment="X"` kwarg.  Support for autogenerate for Table
and Column objects has also been added

Fixes: sqlalchemy#422
Change-Id: I1fd37bb7fe3d167baf7b1e7bf7ff5bfd48e7cf54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants