Johbo's Notes - Working on the Web
  • About Me
  • Archives

Creating a partial unique index with SQLAlchemy in PostgreSQL

Fri 04 November 2016 by Johannes Bornhold in develop Tags sqlalchemy / postgresql / snippet

A partial unique index allows to constrain only a subset of the records in a table. This post shows an example how to implement a partial unique constraint with SQLAlchemy.

more ...

Printing the generated query including parameters

Sun 23 October 2016 by Johannes Bornhold in develop Tags sqlalchemy / sql

Small example how to print out a SQLAlchemy query with parameters being expanded.

more ...

Creating a test database with SQLAlchemy

Fri 05 August 2016 by Johannes Bornhold in develop Tags python / pytest / sqlalchemy / db

A wrap up of a simple fixture for py.test which creates a test database based on SQLAlchemy.

more ...

Data migrations with Alembic - Plain SQL

Tue 26 July 2016 by Johannes Bornhold in develop Tags python / sqlalchemy / alembic / database

An example how to use plain SQL to migrate data in a database using Alembic.

more ...

  • Social

    • mastodon
    • matrix
    • github
  • Categories

    • cloud
    • develop
    • event
    • hello
    • macos
    • nixos
    • tools

© 2016 Johannes Bornhold

Back to top