mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-03 06:23:35 +00:00
Merge branch 'rscds' of git+ssh://git.catalyst.net.nz/git/public/rscds into rscds
This commit is contained in:
commit
21794ddcea
16
dba/patches/1.1.11.sql
Normal file
16
dba/patches/1.1.11.sql
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
-- Sort out accessing calendar entries.
|
||||
|
||||
BEGIN;
|
||||
SELECT check_db_revision(1,1,10);
|
||||
|
||||
ALTER TABLE calendar_item DROP CONSTRAINT "$1";
|
||||
ALTER TABLE calendar_item ADD CONSTRAINT "$1" FOREIGN KEY (user_no) REFERENCES usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE;
|
||||
|
||||
ALTER TABLE collection DROP CONSTRAINT "$1";
|
||||
ALTER TABLE collection ADD CONSTRAINT "$1" FOREIGN KEY (user_no) REFERENCES usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE;
|
||||
|
||||
SELECT new_db_revision(1,1,11, 'November' );
|
||||
COMMIT;
|
||||
ROLLBACK;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
-- The main event. Where we store the things the calendar throws at us.
|
||||
CREATE TABLE caldav_data (
|
||||
user_no INT references usr(user_no),
|
||||
user_no INT references usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
dav_name TEXT,
|
||||
dav_etag TEXT,
|
||||
created TIMESTAMP WITH TIME ZONE,
|
||||
@ -69,7 +69,7 @@ GRANT SELECT,INSERT,UPDATE,DELETE ON calendar_item TO general;
|
||||
|
||||
-- Something that can look like a filesystem hierarchy where we store stuff
|
||||
CREATE TABLE collection (
|
||||
user_no INT references usr(user_no),
|
||||
user_no INT references usr(user_no) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE,
|
||||
parent_container TEXT,
|
||||
dav_name TEXT,
|
||||
dav_etag TEXT,
|
||||
@ -142,4 +142,4 @@ CREATE TABLE freebusy_ticket (
|
||||
|
||||
GRANT INSERT,SELECT,UPDATE,DELETE ON TABLE freebusy_ticket TO general;
|
||||
|
||||
SELECT new_db_revision(1,1,10, 'October' );
|
||||
SELECT new_db_revision(1,1,11, 'November' );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user