sqlalchemy-migrate does not find change file for version











up vote
0
down vote

favorite












I am evaluating SQLAlchemy-migrate as a database migration tool. My db_version is 0, and the repository version is 1.



$ python manage.py db_version --url=postgresql://localhost:5432/my_db
0

$ python manage.py version
1


and I only have one unapplied version:



./versions/001_initial_schema_postgres_upgrade.sql



I run the migration tool, but it won't upgrade because it can't find the version:



$ python manage.py upgrade --version 1 --url=postgresql://localhost:5432/my_db



"There is no script for %d version" % self.version
AssertionError: There is no script for 1 version


Am I doing something wrong so that the migrate tool can't find my change script?










share|improve this question


















  • 1




    I know that this isn't answering your question, but I haven't used SQLAlchemy-migrate and so I thought I'd have a look at the source. It doesn't seem to be very actively maintained (e.g. latest python they have tested on is 3.4 which was released in 2014). If you are just learning and want to try something more actively maintained try alembic which is another sqlalchemy based migration tool. If you need/prefer to use sqlalchemy-migrate then feel free to disregard!
    – SuperShoot
    Nov 11 at 9:00










  • Thanks! I’ll take a look at alembic.
    – wrattlesnake_wrangler
    Nov 11 at 17:04















up vote
0
down vote

favorite












I am evaluating SQLAlchemy-migrate as a database migration tool. My db_version is 0, and the repository version is 1.



$ python manage.py db_version --url=postgresql://localhost:5432/my_db
0

$ python manage.py version
1


and I only have one unapplied version:



./versions/001_initial_schema_postgres_upgrade.sql



I run the migration tool, but it won't upgrade because it can't find the version:



$ python manage.py upgrade --version 1 --url=postgresql://localhost:5432/my_db



"There is no script for %d version" % self.version
AssertionError: There is no script for 1 version


Am I doing something wrong so that the migrate tool can't find my change script?










share|improve this question


















  • 1




    I know that this isn't answering your question, but I haven't used SQLAlchemy-migrate and so I thought I'd have a look at the source. It doesn't seem to be very actively maintained (e.g. latest python they have tested on is 3.4 which was released in 2014). If you are just learning and want to try something more actively maintained try alembic which is another sqlalchemy based migration tool. If you need/prefer to use sqlalchemy-migrate then feel free to disregard!
    – SuperShoot
    Nov 11 at 9:00










  • Thanks! I’ll take a look at alembic.
    – wrattlesnake_wrangler
    Nov 11 at 17:04













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am evaluating SQLAlchemy-migrate as a database migration tool. My db_version is 0, and the repository version is 1.



$ python manage.py db_version --url=postgresql://localhost:5432/my_db
0

$ python manage.py version
1


and I only have one unapplied version:



./versions/001_initial_schema_postgres_upgrade.sql



I run the migration tool, but it won't upgrade because it can't find the version:



$ python manage.py upgrade --version 1 --url=postgresql://localhost:5432/my_db



"There is no script for %d version" % self.version
AssertionError: There is no script for 1 version


Am I doing something wrong so that the migrate tool can't find my change script?










share|improve this question













I am evaluating SQLAlchemy-migrate as a database migration tool. My db_version is 0, and the repository version is 1.



$ python manage.py db_version --url=postgresql://localhost:5432/my_db
0

$ python manage.py version
1


and I only have one unapplied version:



./versions/001_initial_schema_postgres_upgrade.sql



I run the migration tool, but it won't upgrade because it can't find the version:



$ python manage.py upgrade --version 1 --url=postgresql://localhost:5432/my_db



"There is no script for %d version" % self.version
AssertionError: There is no script for 1 version


Am I doing something wrong so that the migrate tool can't find my change script?







python sqlalchemy sqlalchemy-migrate






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 21:19









wrattlesnake_wrangler

12




12








  • 1




    I know that this isn't answering your question, but I haven't used SQLAlchemy-migrate and so I thought I'd have a look at the source. It doesn't seem to be very actively maintained (e.g. latest python they have tested on is 3.4 which was released in 2014). If you are just learning and want to try something more actively maintained try alembic which is another sqlalchemy based migration tool. If you need/prefer to use sqlalchemy-migrate then feel free to disregard!
    – SuperShoot
    Nov 11 at 9:00










  • Thanks! I’ll take a look at alembic.
    – wrattlesnake_wrangler
    Nov 11 at 17:04














  • 1




    I know that this isn't answering your question, but I haven't used SQLAlchemy-migrate and so I thought I'd have a look at the source. It doesn't seem to be very actively maintained (e.g. latest python they have tested on is 3.4 which was released in 2014). If you are just learning and want to try something more actively maintained try alembic which is another sqlalchemy based migration tool. If you need/prefer to use sqlalchemy-migrate then feel free to disregard!
    – SuperShoot
    Nov 11 at 9:00










  • Thanks! I’ll take a look at alembic.
    – wrattlesnake_wrangler
    Nov 11 at 17:04








1




1




I know that this isn't answering your question, but I haven't used SQLAlchemy-migrate and so I thought I'd have a look at the source. It doesn't seem to be very actively maintained (e.g. latest python they have tested on is 3.4 which was released in 2014). If you are just learning and want to try something more actively maintained try alembic which is another sqlalchemy based migration tool. If you need/prefer to use sqlalchemy-migrate then feel free to disregard!
– SuperShoot
Nov 11 at 9:00




I know that this isn't answering your question, but I haven't used SQLAlchemy-migrate and so I thought I'd have a look at the source. It doesn't seem to be very actively maintained (e.g. latest python they have tested on is 3.4 which was released in 2014). If you are just learning and want to try something more actively maintained try alembic which is another sqlalchemy based migration tool. If you need/prefer to use sqlalchemy-migrate then feel free to disregard!
– SuperShoot
Nov 11 at 9:00












Thanks! I’ll take a look at alembic.
– wrattlesnake_wrangler
Nov 11 at 17:04




Thanks! I’ll take a look at alembic.
– wrattlesnake_wrangler
Nov 11 at 17:04

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243517%2fsqlalchemy-migrate-does-not-find-change-file-for-version%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243517%2fsqlalchemy-migrate-does-not-find-change-file-for-version%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Lugert, Oklahoma