Skip to content

Database

  • All database tables must have a surrogate UUID primary key (id column).
  • Migrations must use Alembic operations (op.create_table, op.add_column, op.alter_column, op.drop_column, op.create_index, op.drop_index, op.drop_table, etc.) instead of raw SQL. op.execute() is only acceptable for data migrations (INSERT, UPDATE, DELETE) that have no Alembic equivalent.