Skip to content

Commit b208238

Browse files
committed
Update demo data
1 parent a64c290 commit b208238

2 files changed

Lines changed: 255 additions & 215 deletions

File tree

database/help_desk.pgsql.sql

Lines changed: 128 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ VALUES (1, 'Lowest', '#dcfce7', '#22c55e', 'fa-arrow-down', NULL, '2022-09-19 10
6565
INSERT INTO ticket_statuses (id, title, text_color, bg_color, "default", deleted_at, created_at,
6666
updated_at, slug)
6767
VALUES (1, 'Created', '#6b7280', '#f3f4f6', true, NULL, '2022-09-19 09:17:50', '2022-09-19 11:30:48', 'created'),
68-
(2, 'In progress', '#0ea5e9', '#e0f2fe', false, NULL, '2022-09-19 09:19:17', '2022-09-19 11:30:48', 'in_progress'),
68+
(2, 'In progress', '#0ea5e9', '#e0f2fe', false, NULL, '2022-09-19 09:19:17', '2022-09-19 11:30:48',
69+
'in_progress'),
6970
(3, 'Done', '#f97316', '#ffedd5', false, NULL, '2022-09-19 09:21:17', '2022-09-19 11:30:48', 'done'),
7071
(4, 'Validated', '#22c55e', '#dcfce7', false, NULL, '2022-09-19 09:21:29', '2022-09-19 11:30:48', 'validated'),
7172
(5, 'Rejected', '#ef4444', '#fee2e2', false, NULL, '2022-09-19 09:21:41', '2022-09-19 11:30:48', 'rejected');
@@ -81,113 +82,133 @@ VALUES (1, 'Improvement', '#dbeafe', '#3b82f6', 'fa-arrow-up', NULL, '2022-09-19
8182
(5, 'Bug', '#ef4444', '#fee2e2', 'fa-bug', NULL, '2022-09-19 10:37:37', '2022-09-19 11:31:04', 'bug');
8283

8384

84-
INSERT INTO companies (id, name, logo, description, is_disabled, responsible_id, deleted_at, created_at, updated_at) VALUES
85-
(1, 'Google', null, '<p>Google is an American technology services company founded in 1998 in Silicon Valley, California, by Larry Page and Sergey Brin, creators of the Google search engine. It has been a subsidiary of the Alphabet company since August 2015.</p>', false, 4, NULL, '2022-09-24 23:31:50', '2022-09-24 23:44:50'),
86-
(2, 'Meta', null, '<p>Meta Platforms, Inc., better known by the trade name Meta, is an American company created in 2004 by Mark Zuckerberg. It is one of the giants of the Web, grouped under the acronym GAFAM, alongside Google, Apple, Amazon and Microsoft.</p>', true, 5, NULL, '2022-09-24 23:46:26', '2022-09-24 23:46:47');
85+
INSERT INTO companies (id, name, logo, description, is_disabled, responsible_id, deleted_at, created_at, updated_at)
86+
VALUES (1, 'Google', null,
87+
'<p>Google is an American technology services company founded in 1998 in Silicon Valley, California, by Larry Page and Sergey Brin, creators of the Google search engine. It has been a subsidiary of the Alphabet company since August 2015.</p>',
88+
false, 4, NULL, '2022-09-24 23:31:50', '2022-09-24 23:44:50'),
89+
(2, 'Meta', null,
90+
'<p>Meta Platforms, Inc., better known by the trade name Meta, is an American company created in 2004 by Mark Zuckerberg. It is one of the giants of the Web, grouped under the acronym GAFAM, alongside Google, Apple, Amazon and Microsoft.</p>',
91+
true, 5, NULL, '2022-09-24 23:46:26', '2022-09-24 23:46:47');
8792

8893

8994
TRUNCATE TABLE permissions CASCADE;
90-
INSERT INTO permissions (id, name, guard_name, created_at, updated_at) VALUES
91-
(1, 'View all projects', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
92-
(2, 'Update all projects', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
93-
(3, 'Delete all projects', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
94-
(4, 'Create projects', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
95-
(5, 'View own projects', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
96-
(6, 'Update own projects', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
97-
(7, 'Delete own projects', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
98-
(8, 'View all tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
99-
(9, 'Update all tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
100-
(10, 'Delete all tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
101-
(11, 'Create tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
102-
(12, 'View own tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
103-
(13, 'Update own tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
104-
(14, 'Delete own tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
105-
(15, 'Assign tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
106-
(16, 'Change status tickets', 'web', '2022-09-25 15:51:10', '2022-09-25 15:51:10'),
107-
(17, 'Can view Analytics page', 'web', '2022-09-25 16:32:37', '2022-09-25 16:32:37'),
108-
(18, 'Can view Tickets page', 'web', '2022-09-25 16:32:37', '2022-09-25 16:32:37'),
109-
(19, 'Can view Kanban page', 'web', '2022-09-25 16:32:37', '2022-09-25 16:32:37'),
110-
(21, 'View all users', 'web', '2022-09-25 16:41:08', '2022-09-25 16:41:08'),
111-
(22, 'View company users', 'web', '2022-09-25 16:41:08', '2022-09-25 16:41:08'),
112-
(25, 'Manage ticket statuses', 'web', '2022-09-25 16:41:08', '2022-09-25 16:41:08'),
113-
(26, 'Manage ticket priorities', 'web', '2022-09-25 16:41:08', '2022-09-25 16:41:08'),
114-
(27, 'Manage ticket types', 'web', '2022-09-25 16:41:08', '2022-09-25 16:41:08'),
115-
(28, 'View activity log', 'web', '2022-09-25 16:41:08', '2022-09-25 16:41:08'),
116-
(29, 'Create users', 'web', '2022-09-25 17:05:37', '2022-09-25 17:05:37'),
117-
(30, 'Update users', 'web', '2022-09-25 17:05:37', '2022-09-25 17:05:37'),
118-
(31, 'Delete users', 'web', '2022-09-25 17:05:37', '2022-09-25 17:05:37'),
119-
(32, 'Assign permissions', 'web', '2022-09-25 17:05:37', '2022-09-25 17:05:37'),
120-
(33, 'View all companies', 'web', '2022-09-25 17:14:01', '2022-09-25 17:14:01'),
121-
(34, 'View own companies', 'web', '2022-09-25 17:14:02', '2022-09-25 17:14:02'),
122-
(38, 'Create companies', 'web', '2022-09-25 17:19:38', '2022-09-25 17:19:38'),
123-
(39, 'Update companies', 'web', '2022-09-25 17:19:38', '2022-09-25 17:19:38'),
124-
(40, 'Delete companies', 'web', '2022-09-25 17:19:38', '2022-09-25 17:19:38');
95+
TRUNCATE TABLE permissions CASCADE;
96+
TRUNCATE TABLE roles CASCADE;
97+
TRUNCATE TABLE role_has_permissions CASCADE;
98+
99+
TRUNCATE TABLE model_has_roles;
100+
INSERT INTO model_has_roles (role_id, model_type, model_id)
101+
VALUES (1, 'App\\Models\\User', 4),
102+
(2, 'App\\Models\\User', 5),
103+
(3, 'App\\Models\\User', 6);
104+
105+
INSERT INTO permissions (id, name, guard_name, created_at, updated_at)
106+
VALUES (1, 'View all projects', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
107+
(2, 'Update all projects', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
108+
(3, 'Delete all projects', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
109+
(4, 'Create projects', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
110+
(5, 'View own projects', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
111+
(6, 'Update own projects', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
112+
(7, 'Delete own projects', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
113+
(8, 'View all tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
114+
(9, 'Update all tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
115+
(10, 'Delete all tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
116+
(11, 'Create tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
117+
(12, 'View own tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
118+
(13, 'Update own tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
119+
(14, 'Delete own tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
120+
(15, 'Assign tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
121+
(16, 'Change status tickets', 'web', '2022-09-25 14:51:10', '2022-09-25 14:51:10'),
122+
(17, 'Can view Analytics page', 'web', '2022-09-25 15:32:37', '2022-09-25 15:32:37'),
123+
(18, 'Can view Tickets page', 'web', '2022-09-25 15:32:37', '2022-09-25 15:32:37'),
124+
(19, 'Can view Kanban page', 'web', '2022-09-25 15:32:37', '2022-09-25 15:32:37'),
125+
(20, 'Can view Administration page', 'web', '2022-09-25 15:32:37', '2022-09-25 15:32:37'),
126+
(21, 'View all users', 'web', '2022-09-25 15:41:08', '2022-09-25 15:41:08'),
127+
(22, 'View company users', 'web', '2022-09-25 15:41:08', '2022-09-25 15:41:08'),
128+
(25, 'Manage ticket statuses', 'web', '2022-09-25 15:41:08', '2022-09-25 15:41:08'),
129+
(26, 'Manage ticket priorities', 'web', '2022-09-25 15:41:08', '2022-09-25 15:41:08'),
130+
(27, 'Manage ticket types', 'web', '2022-09-25 15:41:08', '2022-09-25 15:41:08'),
131+
(28, 'View activity log', 'web', '2022-09-25 15:41:08', '2022-09-25 15:41:08'),
132+
(29, 'Create users', 'web', '2022-09-25 16:05:37', '2022-09-25 16:05:37'),
133+
(30, 'Update users', 'web', '2022-09-25 16:05:37', '2022-09-25 16:05:37'),
134+
(31, 'Delete users', 'web', '2022-09-25 16:05:37', '2022-09-25 16:05:37'),
135+
(32, 'Assign permissions', 'web', '2022-09-25 16:05:37', '2022-09-25 16:05:37'),
136+
(33, 'View all companies', 'web', '2022-09-25 16:14:01', '2022-09-25 16:14:01'),
137+
(34, 'View own companies', 'web', '2022-09-25 16:14:02', '2022-09-25 16:14:02'),
138+
(38, 'Create companies', 'web', '2022-09-25 16:19:38', '2022-09-25 16:19:38'),
139+
(39, 'Update companies', 'web', '2022-09-25 16:19:38', '2022-09-25 16:19:38'),
140+
(40, 'Delete companies', 'web', '2022-09-25 16:19:38', '2022-09-25 16:19:38'),
141+
(41, 'Manage user roles', 'web', '2022-09-30 07:40:23', '2022-09-30 07:40:23'),
142+
(42, 'Create user roles', 'web', '2022-09-30 08:10:52', '2022-09-30 08:10:52'),
143+
(43, 'Update user roles', 'web', '2022-09-30 08:10:52', '2022-09-30 08:10:52'),
144+
(44, 'Delete user roles', 'web', '2022-09-30 08:10:52', '2022-09-30 08:10:52');
145+
146+
INSERT INTO roles (id, name, guard_name, created_at, updated_at)
147+
VALUES (1, 'Super administrator', 'web', '2022-09-30 08:11:23', '2022-09-30 08:11:23'),
148+
(2, 'Employee', 'web', '2022-09-30 08:14:58', '2022-09-30 08:14:58'),
149+
(3, 'Customer', 'web', '2022-09-30 08:17:01', '2022-09-30 08:17:01');
125150

126-
INSERT INTO model_has_permissions (permission_id, model_type, model_id) VALUES
127-
(1, 'App\Models\User', 4),
128-
(2, 'App\Models\User', 4),
129-
(3, 'App\Models\User', 4),
130-
(4, 'App\Models\User', 4),
131-
(5, 'App\Models\User', 4),
132-
(6, 'App\Models\User', 4),
133-
(7, 'App\Models\User', 4),
134-
(8, 'App\Models\User', 4),
135-
(9, 'App\Models\User', 4),
136-
(10, 'App\Models\User', 4),
137-
(11, 'App\Models\User', 4),
138-
(12, 'App\Models\User', 4),
139-
(13, 'App\Models\User', 4),
140-
(14, 'App\Models\User', 4),
141-
(15, 'App\Models\User', 4),
142-
(16, 'App\Models\User', 4),
143-
(17, 'App\Models\User', 4),
144-
(18, 'App\Models\User', 4),
145-
(19, 'App\Models\User', 4),
146-
(21, 'App\Models\User', 4),
147-
(22, 'App\Models\User', 4),
148-
(25, 'App\Models\User', 4),
149-
(26, 'App\Models\User', 4),
150-
(27, 'App\Models\User', 4),
151-
(28, 'App\Models\User', 4),
152-
(29, 'App\Models\User', 4),
153-
(30, 'App\Models\User', 4),
154-
(31, 'App\Models\User', 4),
155-
(32, 'App\Models\User', 4),
156-
(33, 'App\Models\User', 4),
157-
(34, 'App\Models\User', 4),
158-
(38, 'App\Models\User', 4),
159-
(39, 'App\Models\User', 4),
160-
(40, 'App\Models\User', 4),
161-
(5, 'App\Models\User', 5),
162-
(11, 'App\Models\User', 5),
163-
(12, 'App\Models\User', 5),
164-
(13, 'App\Models\User', 5),
165-
(14, 'App\Models\User', 5),
166-
(15, 'App\Models\User', 5),
167-
(16, 'App\Models\User', 5),
168-
(17, 'App\Models\User', 5),
169-
(18, 'App\Models\User', 5),
170-
(19, 'App\Models\User', 5),
171-
(5, 'App\Models\User', 6),
172-
(11, 'App\Models\User', 6),
173-
(12, 'App\Models\User', 6),
174-
(13, 'App\Models\User', 6),
175-
(14, 'App\Models\User', 6),
176-
(17, 'App\Models\User', 6),
177-
(18, 'App\Models\User', 6),
178-
(19, 'App\Models\User', 6),
179-
(22, 'App\Models\User', 6),
180-
(29, 'App\Models\User', 6),
181-
(30, 'App\Models\User', 6),
182-
(34, 'App\Models\User', 6),
183-
(39, 'App\Models\User', 6),
184-
(5, 'App\Models\User', 10),
185-
(11, 'App\Models\User', 10),
186-
(12, 'App\Models\User', 10),
187-
(13, 'App\Models\User', 10),
188-
(14, 'App\Models\User', 10),
189-
(15, 'App\Models\User', 10),
190-
(16, 'App\Models\User', 10),
191-
(17, 'App\Models\User', 10),
192-
(18, 'App\Models\User', 10),
193-
(19, 'App\Models\User', 10);
151+
INSERT INTO role_has_permissions (permission_id, role_id)
152+
VALUES (1, 1),
153+
(2, 1),
154+
(3, 1),
155+
(4, 1),
156+
(5, 1),
157+
(5, 2),
158+
(5, 3),
159+
(6, 1),
160+
(7, 1),
161+
(8, 1),
162+
(9, 1),
163+
(10, 1),
164+
(11, 1),
165+
(11, 2),
166+
(11, 3),
167+
(12, 1),
168+
(12, 2),
169+
(12, 3),
170+
(13, 1),
171+
(13, 2),
172+
(13, 3),
173+
(14, 1),
174+
(14, 2),
175+
(14, 3),
176+
(15, 1),
177+
(15, 2),
178+
(16, 1),
179+
(16, 2),
180+
(17, 1),
181+
(17, 2),
182+
(17, 3),
183+
(18, 1),
184+
(18, 2),
185+
(18, 3),
186+
(19, 1),
187+
(19, 2),
188+
(19, 3),
189+
(20, 1),
190+
(20, 3),
191+
(21, 1),
192+
(22, 1),
193+
(22, 3),
194+
(25, 1),
195+
(26, 1),
196+
(27, 1),
197+
(28, 1),
198+
(29, 1),
199+
(29, 3),
200+
(30, 1),
201+
(30, 3),
202+
(31, 1),
203+
(32, 1),
204+
(33, 1),
205+
(34, 1),
206+
(34, 3),
207+
(38, 1),
208+
(39, 1),
209+
(39, 3),
210+
(40, 1),
211+
(41, 1),
212+
(42, 1),
213+
(43, 1),
214+
(44, 1);

0 commit comments

Comments
 (0)