- Timestamp:
- 03/08/11 23:08:25 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.sql
r85 r86 49 49 50 50 -- Provide a basic default group 51 COPY groups (group_id, parent_group_id, group_name) FROM stdin;51 COPY groups (group_id, parent_group_id, permission_id, group_name) FROM stdin; 52 52 1 1 1 default 53 53 \. … … 79 79 record_edit boolean DEFAULT false NOT NULL, 80 80 record_delete boolean DEFAULT false NOT NULL, 81 user_id integer DEFAULT 0 NOT NULL,82 group_id integer DEFAULT 0 NOT NULL81 user_id integer UNIQUE, 82 group_id integer UNIQUE 83 83 ); 84 84 85 85 -- Need *two* basic permissions; one for the initial group, one for the default admin user 86 COPY permissions (permission_id, admin, self_edit, group_create, group_edit group_delete, user_create, user_edit, user_delete, domain_create, domain_edit, domain_delete, record_create, record_edit, record_delete) FROM stdin;87 1 n n n n n n n n n n n n n n88 2 y n n n n n n n n n n n n n86 COPY permissions (permission_id, admin, self_edit, group_create, group_edit, group_delete, user_create, user_edit, user_delete, domain_create, domain_edit, domain_delete, record_create, record_edit, record_delete, user_id, group_id) FROM stdin; 87 1 f f f f f f f f f f f f f f \N 1 88 2 t f f f f f f f f f f f f f 1 \N 89 89 \. 90 90 … … 195 195 196 196 -- create initial default user? may be better to create an "initialize" script or something 197 COPY users (user_id, group_id, username, "password", firstname, lastname, phone, "type", status, acl) FROM stdin;198 1 1 test@test $1$BByge8u2$48AaGX3YeHplfErX5Tlqa1 \N \N \N S 1 A 2197 COPY users (user_id, group_id, username, "password", firstname, lastname, phone, "type", status, permission_id, inherit_perm) FROM stdin; 198 1 1 test@test $1$BByge8u2$48AaGX3YeHplfErX5Tlqa1 \N \N \N S 1 2 f 199 199 \. 200 200 … … 247 247 ALTER TABLE ONLY groups 248 248 ADD CONSTRAINT group_parent FOREIGN KEY (parent_group_id) REFERENCES groups(group_id); 249 250 -- set starting sequence numbers, since we've inserted data before they're active 251 SELECT pg_catalog.setval('default_records_record_id_seq', 8, true); 252 SELECT pg_catalog.setval('domains_domain_id_seq', 1, false); 253 SELECT pg_catalog.setval('groups_group_id_seq', 2, true); 254 SELECT pg_catalog.setval('permissions_permission_id_seq', 3, true); 255 SELECT pg_catalog.setval('records_record_id_seq', 1, false); 256 SELECT pg_catalog.setval('users_user_id_seq', 2, false);
Note:
See TracChangeset
for help on using the changeset viewer.