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

Ability to add columns after the intial creation of the view #2

Open
ryanchuleff opened this issue Apr 3, 2011 · 1 comment
Open

Comments

@ryanchuleff
Copy link

I came across an issue when I tried to add an additional column to my child table and realized that the associated view also needed to be updated. As a stop gap, I modified your CreateTheViewForCITIEs method to do a "CREATE OR REPLACE VIEW ...." instead of just a CREATE which allows me to just add the method call in each subsequent migration where I add or remove a column. For the sake of readability by other coders who may not have known what I did, it would be good if you could override the add_column and remove_column methods so that it happens auto-magically. Would be good for ensuring that this key step doesnt get missed

@altrabio
Copy link
Owner

altrabio commented Apr 4, 2011

You are completely right, this point is neither mentionned in the documentation nor "automagically" taken into account. Consequently, I will try as soon as possible to :

  1. mention this point in the documentation,
  2. update the code and either override "add_column" and "remove_column" methods or propose a modification of the CreateTheViewForCITIEs methods just like you have done.

Thanks a lot for your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants