projects
/
migration-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
9f5e921
)
(no commit message)
author
Jason Etheridge
<jason@esilibrary.com>
Sat, 23 Aug 2008 05:01:06 +0000 (
05:01
+0000)
committer
Jason Etheridge
<jason@esilibrary.com>
Sat, 23 Aug 2008 05:01:06 +0000 (
05:01
+0000)
clear-db.sql
patch
|
blob
|
history
diff --git
a/clear-db.sql
b/clear-db.sql
index
c51f091
..
1602265
100644
(file)
--- a/
clear-db.sql
+++ b/
clear-db.sql
@@
-9,7
+9,7
@@
CREATE TEMP TABLE dummy_cn AS SELECT * FROM asset.call_number WHERE id = -1;
CREATE TEMP TABLE backup_loc AS SELECT * FROM asset.copy_location WHERE id = 1;
CREATE TEMP TABLE backup_usr AS SELECT * FROM actor.usr WHERE id = 1;
-CREATE TEMP TABLE backup_card AS SELECT * FROM actor.card WHERE usr = 1;
+CREATE TEMP TABLE backup_card AS SELECT * FROM actor.card WHERE usr IN (SELECT id FROM backup_usr);
UPDATE backup_usr SET card = NULL;