From 15db1831514aeb9fd77b7bf43a2718b1ffc4d552 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Tue, 25 Jun 2013 17:12:33 -0500 Subject: [PATCH] Explain about sqlite dropping the constraint and why we're adding it back manually. --- mediagoblin/db/migrations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index fef353af..98e8b139 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -371,6 +371,8 @@ def pw_hash_nullable(db): user_table.c.pw_hash.alter(nullable=True) + # sqlite+sqlalchemy seems to drop this constraint during the + # migration, so we add it back here for now a bit manually. if db.bind.url.drivername == 'sqlite': constraint = UniqueConstraint('username', table=user_table) constraint.create() -- 2.25.1