Questions tagged [sqlalchemy]
Use this tag for the eponymous Python SQL toolkit and Object Relational Mapper.
8
questions with no upvoted or accepted answers
3
votes
0answers
500 views
SELECT query blocking writes in postgresql
We have a web application that sends emails with a queue worker. Before an email is sent we write to a table:
INSERT INTO user_email (user_id, email_key, sent_at) VALUES (
175413579283955991,
...
1
vote
0answers
1k views
UUID default value on PSQL
I'm creating my database tables inside a flask application via SQLAlchemy.
According to this answer, my code should look like this:
id = db.Column(db.CHAR(36), primary_key=True, server_default=str("...
1
vote
0answers
215 views
Multiple many-to-many database relations
SO told me to ask here, so this is just copy-pasted from over there
We're making a database of anime. Every anime can be listed as having been made by an arbitrary number of studios, and every studio ...
0
votes
0answers
68 views
Migrating from MariaDB to Mysql - Duplicate Constraint Name
I am attempting to migrate from MariaDB to MySQL by doing a mysqldump from MariaDB and then restoring it to MySQL (mysql:latest docker container).
I am getting the following error when importing into ...
0
votes
1answer
80 views
Ram consumed by single query in Postgres using SqlAlchemy
I have a list of 36 queries ranging from low complexity(No joins) to high complexity(joins with subquery). I want to find the RAM Consumed by each query.
This is required for performance testing for ...
0
votes
2answers
40 views
Database design question: Tags with values(duration) linked to them
I am creating a database that takes in daily inputs such as:
Date
Events in that date (e.g. project foo: 5 hours, bar: 2 hours, etc...)
Rating of the date
There's more but these are probably the ...
0
votes
0answers
55 views
How to “lock” a table for select
I have a table called assignments. A user will request an assignment from an API endpoint. I need to ensure that an assignment can only be handed to one user. There will be multiple users requesting ...
0
votes
1answer
280 views
Use of MySQL trigger to insert row's week number
I have a table of orders in a MariaDB database that currently has a datetime column. For the dashboard I am building for this database, I have a statistic I would like to display which is "Orders This ...