Last-minute fixes to get demo up and sorta running.
This commit is contained in:
parent
d03fa41da3
commit
ebf56ae7c1
|
@ -13,6 +13,8 @@ GRANT ALL PRIVILEGES ON DATABASE officehours TO officehours;
|
|||
|
||||
-- Enable case-insensitive matches on some text columns, good for email
|
||||
CREATE EXTENSION citext;
|
||||
CREATE EXTENSION btree_gist;
|
||||
CREATE EXTENSION plv8;
|
||||
|
||||
#
|
||||
|
||||
|
|
|
@ -120,8 +120,8 @@ IF EXISTS (SELECT appointments.id FROM appointments WHERE client_id IN (
|
|||
SELECT staff_id FROM relationship WHERE client_id = q_client_id))
|
||||
AND (q_timerange && appointments.during)) THEN
|
||||
RAISE EXCEPTION 'That appointment slot is already taken.';
|
||||
INSERT INTO appointments (client_id, during) SELECT q_client_id, q_timerange;
|
||||
END IF;
|
||||
INSERT INTO appointments (client_id, during) SELECT q_client_id, q_timerange;
|
||||
END
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
|
|
8
play.hy
8
play.hy
|
@ -60,10 +60,10 @@
|
|||
|
||||
(let [[conn (connect)]
|
||||
[curs (.cursor conn)]
|
||||
[ops ["PERFORM add_appointment(3, '[2015-02-07 10:00, 2015-02-07 10:30)');"
|
||||
"PERFORM add_appointment(4, '[2015-02-07 10:30, 2015-02-07 11:00)');"
|
||||
"PERFORM add_appointment(5, '[2015-02-07 13:00, 2015-02-07 13:30)');"
|
||||
"PERFORM add_appointment(6, '[2015-02-07 13:30, 2015-02-07 14:00)');"]]]
|
||||
[ops ["SELECT add_appointment(3, '[2015-02-07 10:00, 2015-02-07 10:30)');"
|
||||
"SELECT add_appointment(4, '[2015-02-07 10:30, 2015-02-07 11:00)');"
|
||||
"SELECT add_appointment(5, '[2015-02-07 13:00, 2015-02-07 13:30)');"
|
||||
"SELECT add_appointment(6, '[2015-02-07 13:30, 2015-02-07 14:00)');"]]]
|
||||
|
||||
(for [op ops]
|
||||
(print op)
|
||||
|
|
Loading…
Reference in New Issue