blob: 43c898f3db3c7c8038a7d22bcf0343a93b0e85a0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
WITH parent_group AS (
INSERT INTO groups (name, description)
VALUES ('lindenii', 'The Lindenii Project')
RETURNING id
),
child_group AS (
INSERT INTO groups (name, description, parent_group)
SELECT 'forge', 'Lindenii Forge', id
FROM parent_group
RETURNING id
)
INSERT INTO repos (name, group_id, contrib_requirements, filesystem_path)
SELECT 'server', id, 'public', '/home/runxiyu/Lindenii/forge/server/.git'
FROM child_group;
SELECT * FROM groups;
SELECT * FROM repos;
|