[Pypi-checkins] r943 - in trunk/pypi: . tools
richard
python-checkins at python.org
Mon Aug 22 03:19:57 CEST 2011
Author: richard
Date: Mon Aug 22 03:19:57 2011
New Revision: 943
Added:
trunk/pypi/tools/sql-migrate-20110822.sql
Modified:
trunk/pypi/pkgbase_schema.sql
Log:
fix FK contstraint handling on user delete; thanks Andy Todd
Modified: trunk/pypi/pkgbase_schema.sql
==============================================================================
--- trunk/pypi/pkgbase_schema.sql (original)
+++ trunk/pypi/pkgbase_schema.sql Mon Aug 22 03:19:57 2011
@@ -13,7 +13,7 @@
CREATE TABLE openids (
id TEXT PRIMARY KEY,
- name TEXT REFERENCES users
+ name TEXT REFERENCES users ON DELETE CASCADE
);
CREATE TABLE openid_sessions (
Added: trunk/pypi/tools/sql-migrate-20110822.sql
==============================================================================
--- (empty file)
+++ trunk/pypi/tools/sql-migrate-20110822.sql Mon Aug 22 03:19:57 2011
@@ -0,0 +1,2 @@
+ALTER TABLE openids DROP CONSTRAINT openids_name_fkey;
+ALTER TABLE openids ADD CONSTRAINT openids_name_fkey FOREIGN KEY (name) REFERENCES users ON DELETE CASCADE;
More information about the Pypi-checkins
mailing list