Comments (9)
Sorry, I really should have documented this when I did it the first time. I think we can fix this by changing script_location
to just be migrations
in alembic.ini, but it should work in its current form if you go to the top of the Dagobah directory and do this:
alembic -c dagobah/backend/alembic.ini <command>
from dagobah.
Thanks, that worked.
I have added a field "hosts" to dagobah. So I generated the revision file:
alembic -c dagobah/backend/alembic.ini revision -m "add remote host"
And it created a file: dagobah/backend/migrations/versions/23f13ad15934_add_remote_host.py
What should I add in def upgrade():
and def downgrade():
functions?
And I assume I don't need to add a migration for the new table "Host" since its not a change in an existing table, right?
from dagobah.
Check out the existing migration here for an idea of what to do: https://github.com/tthieman/dagobah/blob/master/dagobah/backend/migrations/versions/2ab7af991b87_v0_2.py
Search for "Create a Migration Script" on this page for an idea of how to handle adding and removing an entire table during a migration. It might be able to automate some of that script for you through the discovery process, as well. https://alembic.readthedocs.org/en/latest/tutorial.html
edit: Try this https://alembic.readthedocs.org/en/latest/tutorial.html#auto-generating-migrations
from dagobah.
hey guys, I'm getting problem in flask, while trying to migrate that on heroku.
heroku run python manage.py db init
Creating directory /app/migrations ... done
Creating directory /app/migrations/versions ... done
Generating /app/migrations/env.py ... done
Generating /app/migrations/alembic.ini ... done
Generating /app/migrations/env.pyc ... done
Generating /app/migrations/script.py.mako ... done
Generating /app/migrations/README ... done
Please edit configuration/connection/logging settings in '/app/migrations/alembic.ini' before
proceeding.
But when I tried to migrate it, I got error like ...
*heroku run python manage.py db migrate *
///////////////////////////////////////////
Traceback (most recent call last):
File "manage.py", line 14, in
manager.run()
File "/app/.heroku/python/lib/python2.7/site-packages/flask_script/init.py", line 412, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/app/.heroku/python/lib/python2.7/site-packages/flask_script/init.py", line 383, in handle
res = handle(_args, *_config)
File "/app/.heroku/python/lib/python2.7/site-packages/flask_script/commands.py", line 216, in call
return self.run(_args, *_kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/flask_migrate/init.py", line 171, in migrate
version_path=version_path, rev_id=rev_id)
File "/app/.heroku/python/lib/python2.7/site-packages/alembic/command.py", line 74, in revision
script_directory = ScriptDirectory.from_config(config)
File "/app/.heroku/python/lib/python2.7/site-packages/alembic/script/base.py", line 120, in from_config
version_locations=version_locations
File "/app/.heroku/python/lib/python2.7/site-packages/alembic/script/base.py", line 57, in init
"scripts folder." % dir)
alembic.util.CommandError: Path doesn't exist: 'migrations'. Please use the 'init' command to create a new scripts folder.
/////////////////////////////////////////////////////////////////////////////////////////////////
any idea, to fixed this problem
I'm trying to build an registration app using technology.
- Flask
- Postgresql
- SqlAlchemy
from dagobah.
@Deepakdubey90 You would probably have better luck with your question on Stack Overflow or in Alembic's issue tracker. Your question doesn't seem to be related to Dagobah.
from dagobah.
@Deepakdubey90 i have some problem ,and i don`t know how to fix ,did you have fix this problem anyway???
from dagobah.
@yusank , Yes I have fixed that.
from dagobah.
@Deepakdubey90 hello,how to fix this problem ?i face the same problem,thx!
version_locations=version_locations
File "/app/.heroku/python/lib/python2.7/site-packages/alembic/script/base.py", line 57, in init
"scripts folder." % dir)
alembic.util.CommandError: Path doesn't exist: 'migrations'. Please use the 'init' command to create a new scripts folder.
from dagobah.
@Deepakdubey90 how did you fixed the problem? I am facing the same issue!
from dagobah.
Related Issues (20)
- error when start dagobah
- Installation issue, missing gpost HOT 1
- dagobahd not working on Mac OS X HOT 1
- get_status method for job HOT 2
- Changing code to use py-dag as a package instead of the internal file HOT 2
- RuntimeError: can't start new thread
- How to run and debug the whole project? HOT 1
- Is it distributed?
- Timezone cron / scheduler
- Updating config file, changes not reflected HOT 6
- Run Dagobah from folder HOT 1
- Address jump HOT 6
- [CLOSED] reformat code
- [CLOSED] Reformat code
- [CLOSED] Reformat code
- [CLOSED] update setup requirements
- [CLOSED] add amazon ses service in emails
- [CLOSED] Close SSH connection for remote tasks
- [CLOSED] UnicodeEncodeError while sending basic email
- Fail to install dagobah HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dagobah.