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

EnvironmentContext.configure(), new keyword argument callable: include_column #101

Closed
sqlalchemy-bot opened this Issue Jan 19, 2013 · 5 comments

Comments

Projects
None yet
1 participant
@sqlalchemy-bot

sqlalchemy-bot commented Jan 19, 2013

Migrated issue, originally created by Konsta Vesterinen (@kvesteri)

Similar to EnvironmentContext.configure() keyword argument 'include_symbol' I would like to be able to define callable called 'include_column' which would indicate whether or not given column should be included in the autogenerate process.

Real-life example:
I have situations where the tables of my models have search_vector columns that are not defined within the model. This leads to situation where everytime I autogenerate migrations the search_vector columns are being added to the new migration file.

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jan 19, 2013

Michael Bayer (@zzzeek) wrote:

looking at "include_symbol", the name and signature here is horrifying to me, how wrong I did this. because I definitely don't want an explosion of "include_XYZ" functions here, include_constraint, include_index, no way.

So we have to deprecate include_symbol, which is a great name but unfortunately I've ruined it, and go with the approach used by sphinx, and I guess we can name it include_object, and it will be like this:

def include_object(name, what, **kw):
     ""

where "name" is the name of the object, "what" is the type: for starters, "schema", "table", "column", **kw is for modifiers, like if you get "table" for "what" there also would be a "schema" kw argument.

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jun 7, 2013

Changes by Michael Bayer (@zzzeek):

  • added labels: autogenerate - detection
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 11, 2013

Michael Bayer (@zzzeek) wrote:

949367b

@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Jul 11, 2013

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
@sqlalchemy-bot

This comment has been minimized.

sqlalchemy-bot commented Dec 2, 2013

Michael Bayer (@zzzeek) wrote:

Issue #158 was marked as a duplicate of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment