| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- -- Creates initial entries for a workspace and adds some collections and requests to it.
- -- Creates an environment.
- INSERT INTO workspaces(id, name) VALUES (0, 'My workspace');
- INSERT INTO workspace_envs(id, workspace_id, name) VALUES (0, 0, 'My env');
- -- JSON responses and simple nesting
- INSERT INTO
- workspace_env_variables(id, workspace_id, env_id, name, value, secret)
- VALUES(0, 0, 0, 'BASE_URL', 'https://jsonplaceholder.typicode.com', false);
- INSERT INTO
- workspace_entries(id, workspace_id, parent_id, name, type, auth_inherit)
- VALUES (0, 0, NULL, 'My collection', 1, FALSE);
- INSERT INTO
- workspace_entries(id, workspace_id, parent_id, name, type, auth_inherit)
- VALUES
- (1, 0, 0, 'My request in col', 0, TRUE),
- (2, 0, NULL, 'My request', 0, FALSE);
- INSERT INTO
- request_params(workspace_id, request_id, method, url)
- VALUES
- (0, 1, 'GET', '{{BASE_URL}}/posts/:ID'),
- (0, 2, 'GET', '{{BASE_URL}}/todos/:ID');
- INSERT INTO request_path_params(position, request_id, name, value)
- VALUES
- (18, 1, 'ID', '1'),
- (18, 2, 'ID', '1');
- INSERT INTO request_headers(request_id, name, value) VALUES(1, 'accept', '*/*');
- -- Hardcore nesting
- INSERT INTO
- workspace_entries(id, workspace_id, parent_id, name, type)
- VALUES
- (3, 0, 0, 'Beginning of the nesting', 1),
- (4, 0, 3, 'Continuation of the nesting', 1),
- (5, 0, 4, 'Beginning of hardcore nesting', 1),
- (6, 0, 5, 'This one is really nested and has a long name', 1),
- (7, 0, 6, 'The finally nested requested request', 0);
- INSERT INTO
- request_params(workspace_id, request_id, method, url)
- VALUES
- (0, 7, 'GET', 'https://codemirror.net/examples/readonly/');
|