1 | INSERT INTO users (username, is_activate, password, description, registered_at, sex,name,email)
|
---|
2 | VALUES
|
---|
3 | ('user1', true, '$2a$12$0f.x7aBM2wFBZBXoLPj0BObVsk.J1kXFYo5nb4niAWkI4hk5tHvDy', 'First user', NOW(), 'M','viki', 'viki@gmail.com'),
|
---|
4 | ('user2', true, '$2a$12$VkR0a47LDVM6aUqFcEJGSu9jhZCz.05tCoyiRicFObt4f2x2gijKa', 'Second user', NOW(), 'F','stefan', 'stefan@gmail.com'),
|
---|
5 | ('user3', true, '$2a$12$eSLdHHJ1KFgv.dOupmloXeItjrt2o1IB6ER6Nq7WYj9Jfr2bEwK2a', 'Third user', NOW(), 'M','darko', 'darko@gmail.com'),
|
---|
6 | ('user4', true, '$2a$12$dF5SXcNhMulgU3Qre3nh1e.aatRiJZsnfoBSqReGnXe9rIbHYVWhe', 'Fourth user', NOW(), 'F','andrej', 'andrej@gmail.com'),
|
---|
7 | ('user5', true, '$2a$12$zHrloz8WG2zo5S6MTf1C0ez1raMlmDJdB8OOa2I1S2pVy9oI76YTa', 'Fifth user', NOW(), 'M','ramche', 'ramche@gmail.com');
|
---|
8 |
|
---|
9 |
|
---|
10 | INSERT INTO thread (content, user_id)
|
---|
11 | VALUES
|
---|
12 | ('Main content for topic thread 1', 1),
|
---|
13 | ('Main content for topic thread 2', 2),
|
---|
14 | ('Discussion content for topic 1', 1),
|
---|
15 | ('Discussion content for topic 2', 2),
|
---|
16 | ('Project-specific thread content', 3),
|
---|
17 | ('Reply to topic 1', 4),
|
---|
18 | ('Further discussion on topic 2', 5),
|
---|
19 | ('Main content for topic thread', 1),
|
---|
20 | ('Main content for topic thread', 2),
|
---|
21 | ('Discussion content for topic 1', 1),
|
---|
22 | ('Discussion content for topic 2', 2),
|
---|
23 | ('Project-specific thread content', 3),
|
---|
24 | ('Reply to topic 1', 4),
|
---|
25 | ('Further discussion on topic 2', 5),
|
---|
26 | ('Further discussion on topic 2', 5),
|
---|
27 | ('Main content for topic thread', 1),
|
---|
28 | ('Main content for topic thread', 2),
|
---|
29 | ('Discussion content for topic 1', 1),
|
---|
30 | ('Discussion content for topic 2', 2),
|
---|
31 | ('Project-specific thread content', 3),
|
---|
32 | ('Reply to topic 1', 4),
|
---|
33 | ('Further discussion on topic 2', 5);
|
---|
34 |
|
---|
35 | INSERT INTO topic_thread (id, title, parent_id)
|
---|
36 | VALUES
|
---|
37 | (1, 'Topic 1' , 5),
|
---|
38 | (2, 'Topic 2', 5),
|
---|
39 | (8, 'Topic 7' , NULL),
|
---|
40 | (9, 'Topic 8', NULL),
|
---|
41 | (16, 'Topic 9' , NULL),
|
---|
42 | (17, 'Topic 10', NULL);
|
---|
43 |
|
---|
44 | insert into topic_guidelines(topic_id,description)
|
---|
45 | values
|
---|
46 | (1,'Follow guidelines'),
|
---|
47 | ( 2,'Be respectful');
|
---|
48 |
|
---|
49 | INSERT INTO discussion_thread (id, parent_id)
|
---|
50 | VALUES
|
---|
51 | (3, 1),
|
---|
52 | (4, 2),
|
---|
53 | (6, 3),
|
---|
54 | (7, 4);
|
---|
55 |
|
---|
56 | INSERT INTO project_thread (id, title, repo_url)
|
---|
57 | VALUES
|
---|
58 | (5, 'Project 1 Thread', 'http://github.com/project1'),
|
---|
59 | (10, 'Project 2 Thread', 'http://github.com/project1'),
|
---|
60 | (15, 'Project 3 Thread', 'http://github.com/project1');
|
---|
61 |
|
---|
62 | INSERT INTO likes (user_id, thread_id)
|
---|
63 | VALUES
|
---|
64 | (1, 3),
|
---|
65 | (2, 4),
|
---|
66 | (3, 5),
|
---|
67 | (4, 6),
|
---|
68 | (5, 7);
|
---|
69 |
|
---|
70 | INSERT INTO blacklisted_user (topic_id, user_id, moderator_id, start_date, end_date, reason)
|
---|
71 | VALUES
|
---|
72 | (1, 2, 1, NOW(), NOW() + INTERVAL '7 days', 'Spamming'),
|
---|
73 | (2, 3, 4, NOW(), NOW() + INTERVAL '3 days', 'Offensive language');
|
---|
74 |
|
---|
75 | INSERT INTO permissions (name)
|
---|
76 | VALUES
|
---|
77 | ('Create Thread'),
|
---|
78 | ('Delete Thread');
|
---|
79 |
|
---|
80 | INSERT INTO project_roles (name, project_id, description)
|
---|
81 | VALUES
|
---|
82 | ('Admin', 5, 'Admin role for the project'),
|
---|
83 | ('Developer', 5, 'Developer role for the project');
|
---|
84 |
|
---|
85 | INSERT INTO users_project_roles (user_id, project_id, role_name)
|
---|
86 | VALUES
|
---|
87 | (3, 5, 'Admin'),
|
---|
88 | (2, 5, 'Developer'),
|
---|
89 | (4, 5, 'Developer');
|
---|
90 |
|
---|
91 | INSERT INTO project_roles_permissions (permission_name, role_name, project_id)
|
---|
92 | VALUES
|
---|
93 | ('Create Thread', 'Admin', 5),
|
---|
94 | ('Delete Thread', 'Admin', 5);
|
---|
95 |
|
---|
96 |
|
---|
97 | INSERT INTO report (created_at, description, status, thread_id, for_user_id, by_user_id)
|
---|
98 | VALUES
|
---|
99 | (NOW(), 'Inappropriate content', 'PENDING', 3, 2, 1),
|
---|
100 | (NOW(), 'Spam content', 'DENIED', 6, 4, 3);
|
---|
101 |
|
---|
102 | INSERT INTO channel (name, description, project_id, developer_id)
|
---|
103 | VALUES
|
---|
104 | ('Updates', 'Project updates channel', 5, 3);
|
---|
105 |
|
---|
106 | INSERT INTO messages (sent_at, content, sent_by, project_id, channel_name)
|
---|
107 | VALUES
|
---|
108 | (NOW(), 'Hello, team!', 3, 5, 'General'),
|
---|
109 | (NOW(), 'We need to push the deadline.', 3, 5, 'Updates');
|
---|
110 |
|
---|