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

Flask migrations #40

Open
dontknowwat opened this issue May 28, 2015 · 3 comments
Open

Flask migrations #40

dontknowwat opened this issue May 28, 2015 · 3 comments

Comments

@dontknowwat
Copy link

I am not sure how I can use flask-migrate and alembic to generate migrations which create the functions and triggers. I have done this manually but is there a way to automate via migrations? Also the tsvector type is available in sqlalchemy-util, I have to manually add it to the migrations file, How can this be done automatically when i run "db migrate"

@kvesteri
Copy link
Collaborator

I've been doing this manually myself. Better support for alembic would be awesome.

@siddhantgoel
Copy link

I've been doing this manually myself.

Do you just run sql_expressions in alembic's env.py? I was thinking of doing that before the context.run_migrations() call but thought I'll check first what people here are doing/recommend.

@kvesteri
Copy link
Collaborator

I run the expressions in a migration file. Also if the expressions change (for example the latest version of SA-Searchable changed those) then they need to be run again using a separate migration.

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

3 participants