Questions tagged [flask-migrate]

Use this tag for questions related to the Flask extension flask-migrate, this extension implements SQLAlchemy database migrations. It should be used with the tag Flask too.

Flask-Migrate is an extension that handles SQLAlchemy database migrations for Flask applications using Alembic. The database operations are provided as command line arguments for Flask-Script.

Documentation is here

320 questions
-1
votes
1 answer

How to cast values to custom type in SQLAlchemy with Postgres

In the application that I'm building, I've used a Composite Type of Custom types to store data. It's basically a list of simple objects of type: bin = CompositeType(columns=[Column('label', String()), Column('head', Float()), Column('tail',…
Tiago Duque
  • 1,956
  • 1
  • 12
  • 31
-1
votes
1 answer

Flask- Migrate not recognizing models

I'm trying to extend the flask-base project https://github.com/hack4impact/flask-base/tree/master/app which comes with a user model only. I've added to the project so that the dev database looks like the screenshot above. My model folder is made…
user1592380
  • 34,265
  • 92
  • 284
  • 515
-1
votes
2 answers

AttributeError: 'NoneType' object has no attribute 'data'

I try to test friend route for my flask application, but got the error: AttributeError: 'NoneType' object has no attribute 'data' I could test the model but when I want to test flask ('You are now Friend with ') I get the error above. I am not…
LiLi
  • 301
  • 2
  • 7
  • 21
-2
votes
1 answer

flask migration does nothing

I have a project I've been working on. Recently swapped out my os drive and did a fresh install of windows. Obviously rebuilding my workflow and I encountered an error. I try to use db migrate in the context of upgrading my new empty database with…
Cliff Ribeiro
  • 77
  • 1
  • 1
  • 7
-2
votes
1 answer

Is it possible to let users create and perform database migrations from a form?

Can you take form data and change database schema? Is it a good idea? Is there a downside to many migrations from a 'default' database? I want users to be able to add / remove tables, columns, and rows. Making schema changes requires migrations,…
xGlorify
  • 119
  • 1
  • 12
1 2 3
21
22