mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-23 02:14:16 +00:00
Split our data into what should be in everyone's database vs. what is a 'fun'
initial set for playing around.
This commit is contained in:
parent
2e2aa372be
commit
f8c1dd0df5
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
-- FIXME: Only insert the rows if they are not there already.
|
-- FIXME: Only insert the rows if they are not there already.
|
||||||
INSERT INTO roles ( role_no, role_name ) VALUES( 1, 'Admin');
|
INSERT INTO roles ( role_no, role_name ) VALUES( 1, 'Admin');
|
||||||
INSERT INTO roles ( role_no, role_name ) VALUES(2, 'Group Target');
|
INSERT INTO roles ( role_no, role_name ) VALUES( 2, 'Group');
|
||||||
|
INSERT INTO roles ( role_no, role_name ) VALUES( 3, 'Public');
|
||||||
|
INSERT INTO roles ( role_no, role_name ) VALUES( 4, 'Resource');
|
||||||
|
|
||||||
-- Set the insert sequence to the next number, with a minimum of 10
|
-- Set the insert sequence to the next number, with a minimum of 10
|
||||||
SELECT setval('roles_role_no_seq', (SELECT 10 UNION SELECT role_no FROM roles ORDER BY 1 DESC LIMIT 1) );
|
SELECT setval('roles_role_no_seq', (SELECT 10 UNION SELECT role_no FROM roles ORDER BY 1 DESC LIMIT 1) );
|
||||||
@ -14,3 +16,6 @@ INSERT INTO role_member (user_no, role_no) VALUES(1, 1);
|
|||||||
|
|
||||||
-- Set the insert sequence to the next number, with a minimum of 1000
|
-- Set the insert sequence to the next number, with a minimum of 1000
|
||||||
SELECT setval('usr_user_no_seq', (SELECT 1000 UNION SELECT user_no FROM usr ORDER BY 1 DESC LIMIT 1) );
|
SELECT setval('usr_user_no_seq', (SELECT 1000 UNION SELECT user_no FROM usr ORDER BY 1 DESC LIMIT 1) );
|
||||||
|
|
||||||
|
-- Set the insert sequence to the next number, with a minimum of 1000
|
||||||
|
SELECT setval('relationship_type_rt_id_seq', (SELECT 10 UNION SELECT rt_id FROM relationship_type ORDER BY 1 DESC LIMIT 1) );
|
||||||
|
|||||||
@ -45,6 +45,9 @@ INSERT INTO relationship_type ( rt_id, rt_name, rt_isgroup, confers, prefix_matc
|
|||||||
INSERT INTO relationship_type ( rt_id, rt_name, rt_isgroup, confers, prefix_match )
|
INSERT INTO relationship_type ( rt_id, rt_name, rt_isgroup, confers, prefix_match )
|
||||||
VALUES( 4, 'Administers Resource', FALSE, 'RW', '' );
|
VALUES( 4, 'Administers Resource', FALSE, 'RW', '' );
|
||||||
|
|
||||||
|
-- Set the insert sequence to the next number, with a minimum of 1000
|
||||||
|
SELECT setval('relationship_type_rt_id_seq', (SELECT 10 UNION SELECT rt_id FROM relationship_type ORDER BY 1 DESC LIMIT 1) );
|
||||||
|
|
||||||
-- The resources for meetings
|
-- The resources for meetings
|
||||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 200, 100, 4 );
|
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 200, 100, 4 );
|
||||||
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 200, 101, 4 );
|
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 200, 101, 4 );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user