Skip to content
Advertisement

Tag: flask-sqlalchemy

Flask SQLAlchemy reflection ignoring most of tables on Redshift

I’m creating the engine and the Metadata as follows Yields AttributeError: packages, and dir(Base.classes) returns no attributes with that name, neither with the orders name. Taking the only=[‘orders’, ‘packages’] off makes it reflect only a few random tables. Now, when using the inspector that comes with native SQLAlchemy the table actually works (link to documentation): Is this a bug, or

sqlalchemy foreign key could not find table

I’m making a database using sqlalchemy which consists of three classes, User, Meeting, MeetingRoom I want to create a foreign key in Meeting for the Meeting room, but for some reason it gives the following error sqlalchemy.exc.NoReferencedTableError: Foreign key associated with column ‘meeting.mrid’ could not find table ‘meetingroom’ with which to generate a foreign key to target column ‘mrid’ When

how flask-sqlalchemy turn off returning id while insert data

I’m trying to insert data to PostgreSQL 8.3.23 by Flask-SQLAlchemy==2.3.2, the errors show that INSERT statement is not supported in this version of Greenplum Database. so how can I turn off returning id in (flask-)sqlalchemy while insert. Thanks in advance Answer You need to set the implicit_returning create_engine parameter to False. When True, a RETURNING- compatible construct, if available, will

Advertisement