Questions tagged [sqlalchemy-migrate]

Schema migration tools for SQLAlchemy, designed to support an agile approach to database design, and make it easier to keep development and production databases in sync, as schema changes are required.

Inspired by Ruby on Rails’ migrations, SQLAlchemy Migrate provides a way to deal with database schema changes in SQLAlchemy projects. Migrate was started as part of Google’s Summer of Code by Evan Rosson, mentored by Jonathan LaCour. The project was taken over by a small group of volunteers when Evan had no free time for the project. It is now hosted as a Google Code project. During the hosting change the project was renamed to SQLAlchemy Migrate.

Python 2.4-2.7 is supported.

Resources:

97 questions
3
votes
3 answers

setting up Flask db migrations with Elastic Beanstalk

I have set up a site built on Flask sing eb (the Terminal client for Elastic Beanstalk v3.1). When deploying a new version of my site I get "Update environment operation is complete, but with errors. For more information, see troubleshooting…
3
votes
2 answers

How to use SQLAlchemy-Migrate with MySQL Database in Flask

I've been working on replacing my SQLite database with a MySQL database in my Flask app. Previously I've been using scripts from the Mega Flask Tutorial to manage my database creation and migration using SQLAlchemy-Migrate. It seems that these…
Chockomonkey
  • 3,895
  • 7
  • 38
  • 55
3
votes
1 answer

Getting sqlalchemy.migrate to rename a column with primary key

I am trying to rename a column in a table which has the primary key constraint to an another name and add a new column with a new type becoming the primary key. So currently I have : TABLE ( `id` VARCHAR(36) PRIMARY_KEY, ) table; I want to…
Chmouel Boudjnah
  • 2,541
  • 3
  • 24
  • 28
3
votes
0 answers

Sqlalchemy-migrate create column with default values

I'm using SQLAlchemy-migrate 0.6.1 to handle versioning of my mysql database. The link points to the documentation. But they seem to have removed the docs for 0.6.1. I'm trying to add a new column with a foreignkey constraint to a table like…
Carl
  • 740
  • 8
  • 18
2
votes
1 answer

(Python) Connecting mssql database using SQLalchemy and using it

I have a Python webapp that is connected to SQL Server database using SQLalchemy migration. from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager import urllib SQLALCHEMY_TRACK_MODIFICATIONS =…
2
votes
1 answer

Table metadata transfer from sqlserver to postgresql using SQLAlchemy

I am trying to migrate my database from ms sql server to PostgreSQL using python script . Before migrating the data, script needs to create required tables. I intend to use sqlalchemy to create required tables and then migrate the actual data. Below…
karas27
  • 335
  • 1
  • 5
  • 15
2
votes
1 answer

Adding columns to existing tables using sqlalchemy

Is there a way to add columns to an existing table using sqlalchemy? Looking at options, it seems like sqlalchemy-migrate is the popular option, but it seems to be designed around static changes. It also requires setting up the DB to support…
Logick
  • 301
  • 1
  • 6
  • 14
2
votes
1 answer

Flask-migrate No changes in schema detected

I am trying to understand how flask and sqlalchemy works.Below is my app structure init.py contains import os from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import…
2
votes
0 answers

Is it possible to connect to another database during an alembic migration upgrade?

I am performing a standard alembic migration on Database A, however, there is a table in Database B I will need to query during my upgrade. Is it possible to connect to Database B to query and retrieve the result during the upgrade on Database A? db…
2
votes
0 answers

Flask/SQL Alchemy: No application found. Either work inside a view function or push an application context

I'm trying to replicate this https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xxiii-application-programming-interfaces-apis focus only in the API and security (tokens) part. I'm having problems when I'm executing the example to…
Rednaxel
  • 938
  • 2
  • 16
  • 33
2
votes
1 answer

How to specify a full text search index (MySQL) in an Alembic migration?

I'm using Flask-Migrate for a project in which the target database is MySQL-compatible Aurora. I added a full-text index to a model using Menzhuo's SQLAlchemy fulltext search module: class Post(db.Model, FullText, Serializable): __tablename__ =…
Ray Toal
  • 86,166
  • 18
  • 182
  • 232
2
votes
1 answer

ModuleNotFoundError: No module named 'sqlalchemy'

I am new to sqlalchemy and trying to create tables in mysql.Created a virtual environment and executed below commands. pip3 install sqlalchemy pip3 install sqlalchemy-migrate Python version- 3.6.4 but when I try to execute the command "python…
Suchitra
  • 77
  • 1
  • 2
  • 5
2
votes
2 answers

SQL-alchemy: ValueError too many values to unpack?

I have a website running with a mysql database using the sql-alchemy package that has suddenly broken. I have done some research and found that the expected issue is that the newest sql-alchemy update is handing flask-admin one more value than…
2
votes
1 answer

Managing seed data with SqlAlchemy and SqlAlchemy-migrate

I'm using SqlAlchemy in my Pylons application to access data and SqlAlchemy-migrate to maintain the database schema. It works fine for managing the schema itself. However, I also want to manage seed data in a migrate-like way. E.g. when…
Dima Malenko
  • 2,805
  • 2
  • 27
  • 24
2
votes
2 answers

why buildbot throw ImportError: cannot import name exceptions?

I am currently trying to understand buildbot and am going through the first part of tutorial. But I am stuck in the part where I am supposed to create the master. I tried fixing the error by using this website but still give me error. Traceback…
solti
  • 4,339
  • 3
  • 31
  • 51