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

Comments

Projects
None yet
5 participants
@sqlalchemy-bot
Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

sqlalchemy-bot commented Apr 21, 2018

Changes by Michael Bayer (@zzzeek):

  • added labels: op directives
@sqlalchemy-bot

This comment has been minimized.

Copy link

sqlalchemy-bot commented Apr 21, 2018

Changes by Michael Bayer (@zzzeek):

  • set milestone to "tier 1"
@sqlalchemy-bot

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

sqlalchemy-bot commented Apr 21, 2018

Changes by Michael Bayer (@zzzeek):

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

This comment has been minimized.

Copy link

sqlalchemy-bot commented Aug 31, 2018

Sebastian Wehrmann (@sweh) wrote:

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

@sqlalchemy-bot

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

TargetLiu commented Dec 4, 2018

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

@zzzeek

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Collaborator

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

Implemented support for Table and Column Comments
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