From bc01446f1c13a796972fc78288389db603afbf37 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 31 Oct 2006 06:19:48 +0000 Subject: Making Pg-upgrade-2.6.18-2.6.19.sql safe to use for now git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@421 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql') diff --git a/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql b/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql index b2328844..c6bdc4b7 100644 --- a/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql +++ b/sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql @@ -146,6 +146,10 @@ BEGIN; LOCK session in EXCLUSIVE MODE; ALTER TABLE session ADD CONSTRAINT session_token_check check (length(token::text) = 32); ALTER TABLE session ADD column user_id integer not null references users(id); + +-- comment this out when user db is working: +ALTER TABLE session ALTER COLUMN user_id DROP NOT NULL; + LOCK users in EXCLUSIVE MODE; CREATE TABLE users (id serial UNIQUE, username varchar(30) PRIMARY KEY); COMMENT ON TABLE users 'username is the primary key because we don't want duplicate users'; -- cgit v1.2.3