-
Notifications
You must be signed in to change notification settings - Fork 4
/
dump.sql
552 lines (446 loc) · 21.2 KB
/
dump.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
create schema rds;
GRANT USAGE ON SCHEMA rds TO rds;
CREATE TABLE rds."user" (
id integer NOT NULL,
username character varying(50) NOT NULL,
email character varying(255) NOT NULL,
password_hash character varying(60) NOT NULL,
auth_key character varying(32) NOT NULL,
confirmed_at integer,
unconfirmed_email character varying(255) DEFAULT NULL::character varying,
blocked_at integer,
registration_ip character varying(45),
created_at integer NOT NULL,
updated_at integer NOT NULL,
flags integer DEFAULT 0 NOT NULL,
last_login_at integer,
phone character varying(64) DEFAULT NULL::character varying
);
CREATE SEQUENCE user_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE ONLY rds."user" ALTER COLUMN id SET DEFAULT nextval('user_id_seq'::regclass);
ALTER TABLE ONLY rds."user" ADD CONSTRAINT user_pkey PRIMARY KEY (id);
CREATE UNIQUE INDEX rds_user_unique_email ON rds."user" USING btree (email);
CREATE UNIQUE INDEX rds_user_unique_username ON rds."user" USING btree (username);
CREATE TABLE rds.session (
id char(128) NOT NULL PRIMARY KEY,
expire bigint,
data bytea
);
CREATE TABLE "rds"."profile" (
"user_id" int4 NOT NULL,
"name" varchar(255) COLLATE "default" DEFAULT NULL::character varying,
"public_email" varchar(255) COLLATE "default" DEFAULT NULL::character varying,
"gravatar_email" varchar(255) COLLATE "default" DEFAULT NULL::character varying,
"gravatar_id" varchar(32) COLLATE "default" DEFAULT NULL::character varying,
"location" varchar(255) COLLATE "default" DEFAULT NULL::character varying,
"website" varchar(255) COLLATE "default" DEFAULT NULL::character varying,
"bio" text COLLATE "default",
"timezone" varchar(40) COLLATE "default" DEFAULT NULL::character varying
)
WITH (OIDS=FALSE);
CREATE TABLE "rds"."obj_base" (
"obj_id" int8 NOT NULL,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL
)
WITH (OIDS=FALSE)
;
COMMENT ON TABLE "rds"."obj_base" IS 'Abstract base obj';
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table obj_base
-- ----------------------------
ALTER TABLE "rds"."obj_base" ADD PRIMARY KEY ("obj_id");
DROP TABLE IF EXISTS "rds"."release_version";
CREATE TABLE "rds"."release_version" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"rv_version" varchar COLLATE "default" NOT NULL,
"rv_name" varchar COLLATE "default" NOT NULL
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table release_version
-- ----------------------------
ALTER TABLE "rds"."release_version" ADD PRIMARY KEY ("obj_id");
CREATE TABLE "rds"."project" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"project_name" varchar COLLATE "default" NOT NULL,
"project_build_version" int8 DEFAULT 1 NOT NULL,
"project_build_subversion" text NOT NULL,
"project_current_version" varchar(64) COLLATE "default",
"project_notification_email" varchar(64) COLLATE "default",
"project_notification_subject" varchar(64) COLLATE "default",
"script_migration_up" text COLLATE "default",
"script_migration_new" text COLLATE "default",
"script_config_local" text COLLATE "default",
"project_servers" text COLLATE "default",
"script_remove_release" text COLLATE "default",
"script_cron" text COLLATE "default",
"script_deploy" text COLLATE "default",
"script_build" text COLLATE "default",
"script_use" text COLLATE "default"
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table project
-- ----------------------------
ALTER TABLE "rds"."project" ADD PRIMARY KEY ("obj_id");
CREATE TABLE "rds"."release_request" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"rr_comment" varchar COLLATE "default" NOT NULL,
"rr_project_obj_id" int8 NOT NULL,
"rr_build_version" varchar COLLATE "default",
"rr_project_owner_code" varchar COLLATE "default",
"rr_release_engineer_code" varchar COLLATE "default",
"rr_project_owner_code_entered" bool DEFAULT false,
"rr_release_engineer_code_entered" bool DEFAULT false,
"rr_status" varchar COLLATE "default" DEFAULT 'new'::character varying,
"rr_old_version" varchar COLLATE "default",
"rr_use_text" text COLLATE "default",
"rr_last_time_on_prod" timestamptz(6),
"rr_revert_after_time" timestamptz(6),
"rr_release_version" int8,
"rr_new_migration_count" int8 DEFAULT 0,
"rr_migration_status" varchar COLLATE "default" DEFAULT 'none'::character varying,
"rr_new_migrations" text COLLATE "default",
"rr_built_time" timestamptz(6),
"rr_cron_config" text COLLATE "default",
"rr_post_migration_status" varchar COLLATE "default" DEFAULT 'none'::character varying,
"rr_new_post_migrations" text COLLATE "default",
"rr_migration_error" text COLLATE "default",
"rr_leading_id" int8,
"rr_build_started" timestamptz(6),
"rr_user_id" int8 NOT NULL
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Uniques structure for table release_request
-- ----------------------------
ALTER TABLE "rds"."release_request" ADD UNIQUE ("rr_project_obj_id", "rr_build_version");
-- ----------------------------
-- Primary Key structure for table release_request
-- ----------------------------
ALTER TABLE "rds"."release_request" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."release_request"
-- ----------------------------
ALTER TABLE "rds"."release_request" ADD FOREIGN KEY ("rr_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "rds"."release_request" ADD FOREIGN KEY ("rr_leading_id") REFERENCES "rds"."release_request" ("obj_id") ON DELETE SET NULL ON UPDATE SET NULL;
ALTER TABLE "rds"."release_request" ADD FOREIGN KEY ("rr_user_id") REFERENCES "rds"."user" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE TABLE "rds"."release_reject" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"rr_comment" varchar COLLATE "default" NOT NULL,
"rr_project_obj_id" int8 NOT NULL,
"rr_release_version" int8,
"rr_user_id" int8 NOT NULL
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table release_reject
-- ----------------------------
ALTER TABLE "rds"."release_reject" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."release_reject"
-- ----------------------------
ALTER TABLE "rds"."release_reject" ADD FOREIGN KEY ("rr_user_id") REFERENCES "rds"."user" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "rds"."release_reject" ADD FOREIGN KEY ("rr_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
DROP TABLE IF EXISTS "rds"."project_config";
CREATE TABLE "rds"."project_config" (
"obj_id" bigserial NOT NULL,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"pc_project_obj_id" int8 NOT NULL,
"pc_filename" varchar(128) COLLATE "default" NOT NULL,
"pc_content" text COLLATE "default"
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Indexes structure for table project_config
-- ----------------------------
CREATE UNIQUE INDEX "rds_project_config_project_id_filename" ON "rds"."project_config" USING btree ("pc_project_obj_id", "pc_filename");
-- ----------------------------
-- Primary Key structure for table project_config
-- ----------------------------
ALTER TABLE "rds"."project_config" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."project_config"
-- ----------------------------
ALTER TABLE "rds"."project_config" ADD FOREIGN KEY ("pc_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE TABLE "rds"."rds_db_config" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"red_lamp_wts_timeout" timestamptz(6),
"preprod_online" bool DEFAULT true NOT NULL,
"cpu_usage_last_truncate" timestamptz(6),
"is_tst_updating_enabled" int2 DEFAULT 1,
"red_lamp_team_city_timeout" timestamptz(6),
"red_lamp_wts_dev_timeout" timestamptz(6),
"crm_lamp_timeout" timestamptz(6),
"deployment_enabled" bool DEFAULT true,
"deployment_enabled_reason" text COLLATE "default"
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Records of rds_db_config
-- ----------------------------
INSERT INTO "rds"."rds_db_config" VALUES ('1', NOW(), NOW(), '1', '2016-09-22 11:54:28-04', 't', '2017-06-26 09:48:45-04', '1', '2016-09-22 11:54:34-04', '2016-09-22 11:54:36-04', '2016-09-22 11:54:29-04', 't', null);
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table rds_db_config
-- ----------------------------
ALTER TABLE "rds"."rds_db_config" ADD PRIMARY KEY ("obj_id");
CREATE TABLE "rds"."worker" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"worker_name" varchar COLLATE "default" NOT NULL
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
DROP TABLE IF EXISTS "rds"."project2worker";
CREATE TABLE "rds"."project2worker" (
"obj_id" bigserial NOT NULL,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"worker_obj_id" int8 NOT NULL,
"project_obj_id" int8 NOT NULL,
"p2w_current_version" varchar(64) COLLATE "default"
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table project2worker
-- ----------------------------
ALTER TABLE "rds"."project2worker" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."project2worker"
-- ----------------------------
ALTER TABLE "rds"."project2worker" ADD FOREIGN KEY ("worker_obj_id") REFERENCES "rds"."worker" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "rds"."project2worker" ADD FOREIGN KEY ("project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table worker
-- ----------------------------
ALTER TABLE "rds"."worker" ADD PRIMARY KEY ("obj_id");
CREATE TABLE "rds"."project2project" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"parent_project_obj_id" int8 NOT NULL,
"child_project_obj_id" int8 NOT NULL
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Indexes structure for table project2project
-- ----------------------------
CREATE UNIQUE INDEX "rds_project2project_unique_parent_child" ON "rds"."project2project" USING btree ("parent_project_obj_id", "child_project_obj_id");
-- ----------------------------
-- Primary Key structure for table project2project
-- ----------------------------
ALTER TABLE "rds"."project2project" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."project2project"
-- ----------------------------
ALTER TABLE "rds"."project2project" ADD FOREIGN KEY ("child_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE "rds"."project2project" ADD FOREIGN KEY ("parent_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE CASCADE ON UPDATE NO ACTION;
CREATE TABLE "rds"."project_config_history" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"pch_project_obj_id" int8 NOT NULL,
"pch_config" text COLLATE "default",
"pch_filename" varchar(128) COLLATE "default" DEFAULT 'config.local.php'::character varying NOT NULL,
"pch_user_id" int8 NOT NULL
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table project_config_history
-- ----------------------------
ALTER TABLE "rds"."project_config_history" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."project_config_history"
-- ----------------------------
ALTER TABLE "rds"."project_config_history" ADD FOREIGN KEY ("pch_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "rds"."project_config_history" ADD FOREIGN KEY ("pch_user_id") REFERENCES "rds"."user" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE TABLE "rds"."log" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 12 NOT NULL,
"log_text" text COLLATE "default",
"log_user_id" int8
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table log
-- ----------------------------
ALTER TABLE "rds"."log" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."log"
-- ----------------------------
ALTER TABLE "rds"."log" ADD FOREIGN KEY ("log_user_id") REFERENCES "rds"."user" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE TABLE "rds"."build" (
"obj_id" bigserial,
"obj_created" timestamptz(6) DEFAULT now() NOT NULL,
"obj_modified" timestamptz(6) DEFAULT now() NOT NULL,
"obj_status_did" int2 DEFAULT 1 NOT NULL,
"build_release_request_obj_id" int8,
"build_worker_obj_id" int8 NOT NULL,
"build_project_obj_id" int8 NOT NULL,
"build_status" varchar COLLATE "default" DEFAULT 'new'::character varying NOT NULL,
"build_attach" text COLLATE "default" DEFAULT ''::text,
"build_version" varchar(64) COLLATE "default" DEFAULT NULL::character varying,
"build_time_log" text COLLATE "default" DEFAULT '[]'::text
)
INHERITS ("rds"."obj_base")
WITH (OIDS=FALSE)
;
-- ----------------------------
-- Alter Sequences Owned By
-- ----------------------------
-- ----------------------------
-- Primary Key structure for table build
-- ----------------------------
ALTER TABLE "rds"."build" ADD PRIMARY KEY ("obj_id");
-- ----------------------------
-- Foreign Key structure for table "rds"."build"
-- ----------------------------
ALTER TABLE "rds"."build" ADD FOREIGN KEY ("build_release_request_obj_id") REFERENCES "rds"."release_request" ("obj_id") ON DELETE SET NULL ON UPDATE SET NULL;
ALTER TABLE "rds"."build" ADD FOREIGN KEY ("build_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "rds"."build" ADD FOREIGN KEY ("build_worker_obj_id") REFERENCES "rds"."worker" ("obj_id") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "rds"."project_config_history"
DROP CONSTRAINT "project_config_history_pch_project_obj_id_fkey",
ADD CONSTRAINT "project_config_history_pch_project_obj_id_fkey" FOREIGN KEY ("pch_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE "rds"."project_config"
ADD CONSTRAINT "rds_project_config_project_id_foreigs_idx" FOREIGN KEY ("pc_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE "rds"."project2worker"
DROP CONSTRAINT "project2worker_project_obj_id_fkey",
ADD CONSTRAINT "project2worker_project_obj_id_fkey" FOREIGN KEY ("project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT "project2worker_worker_obj_id_fkey" FOREIGN KEY ("worker_obj_id") REFERENCES "rds"."worker" ("obj_id") ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE "rds"."release_request"
DROP CONSTRAINT "release_request_rr_project_obj_id_fkey",
ADD CONSTRAINT "release_request_rr_project_obj_id_fkey" FOREIGN KEY ("rr_project_obj_id") REFERENCES "rds"."project" ("obj_id") ON DELETE CASCADE ON UPDATE NO ACTION;
alter table rds.build owner to rds;
alter table rds.log owner to rds;
alter table rds.obj_base owner to rds;
alter table rds.profile owner to rds;
alter table rds.project owner to rds;
alter table rds.project2project owner to rds;
alter table rds.project2worker owner to rds;
alter table rds.project_config owner to rds;
alter table rds.project_config_history owner to rds;
alter table rds.rds_db_config owner to rds;
alter table rds.release_reject owner to rds;
alter table rds.release_request owner to rds;
alter table rds.release_version owner to rds;
alter table rds.session owner to rds;
alter table rds.user owner to rds;
alter table rds.worker owner to rds;
alter sequence public.user_id_seq owner to rds;
alter sequence rds.build_obj_id_seq owner to rds;
alter sequence rds.log_obj_id_seq owner to rds;
alter sequence rds.project2project_obj_id_seq owner to rds;
alter sequence rds.project2worker_obj_id_seq owner to rds;
alter sequence rds.project_config_history_obj_id_seq owner to rds;
alter sequence rds.project_config_obj_id_seq owner to rds;
alter sequence rds.project_obj_id_seq owner to rds;
alter sequence rds.rds_db_config_obj_id_seq owner to rds;
alter sequence rds.release_reject_obj_id_seq owner to rds;
alter sequence rds.release_request_obj_id_seq owner to rds;
alter sequence rds.release_version_obj_id_seq owner to rds;
alter sequence rds.worker_obj_id_seq owner to rds;
INSERT INTO "rds"."user" (id, username, email, password_hash, auth_key, confirmed_at, unconfirmed_email, blocked_at, registration_ip, created_at, updated_at, flags, last_login_at, phone) VALUES (1, 'rds', '[email protected]', '$2y$10$lt0EyF3ncaolvd2zH7dpLevLf6Y2D1wOxNQmBZaW2U4l0rAWzp9g.', 'sowjrEIgzpBNcuX7pkvkm7-Et2g2aK_X', 1510211975, NULL, NULL, NULL, 1510211975, 1510211975, 0, 1510213995, NULL);
INSERT INTO "rds"."profile" (user_id, name, public_email, gravatar_email, gravatar_id, location, website, bio, timezone) VALUES (1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO "rds".worker (obj_id, obj_created, obj_modified, obj_status_did, worker_name) VALUES (1, '2017-11-23 12:07:47.205588+00', '2017-11-23 12:07:47.205588+00', 1, 'test_worker');
INSERT INTO rds.project (obj_id, obj_created, obj_modified, obj_status_did, project_name, project_build_version, project_build_subversion, project_current_version, project_notification_email, project_notification_subject, script_migration_up, script_migration_new, script_config_local, project_servers, script_remove_release, script_cron, script_deploy, script_build, script_use) VALUES (1, '2017-11-23 12:08:01.236368+00', '2017-11-23 12:08:01.236368+00', 1, 'test_project', 6, '{"1":5}', NULL, '', '', '#!/bin/bash -e
sleep 1
', '#!/bin/bash -e
#echo m170908_130001_project_scripts_cron_deploy
', NULL, NULL, '#!/bin/bash -e
sleep 0.1', NULL, '#!/bin/bash -e
sleep 0.1
', '#!/bin/bash -e
sleep 3
', '#!/bin/bash -e
sleep 0.1
');
INSERT INTO rds.project2worker (obj_id, obj_created, obj_modified, obj_status_did, worker_obj_id, project_obj_id, p2w_current_version) VALUES (1, '2017-11-23 12:08:01.245921+00', '2017-11-23 12:08:01.245921+00', 1, 1, 1, NULL);
INSERT INTO rds.release_version (obj_id, obj_created, obj_modified, obj_status_did, rv_version, rv_name) VALUES (1, '2017-11-23 12:08:09.051372+00', '2017-11-23 12:08:09.051372+00', 1, '1', 'First');