· 11 years ago · Sep 24, 2015, 08:26 PM
1
2FAAMBP:Jobtreks-Web faalbue$ sbt test-only *AlertsSpec
3[info] Loading global plugins from /Users/faalbue/.sbt/0.13/plugins
4[info] Loading project definition from /Users/faalbue/Development/proj/Jobtreks-Web/project/project
5[info] Loading project definition from /Users/faalbue/Development/proj/Jobtreks-Web/project
6[info] Loading project definition from /Users/faalbue/.sbt/0.13/staging/122ea87d9c9158ecd42d/securesocial/project
7[info] Set current project to jobtreks (in build file:/Users/faalbue/Development/proj/Jobtreks-Web/)
8[warn] Multiple resolvers having different access mechanism configured with same name 'Typesafe Releases'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
9[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
10[info] No tests to run for jobtreks-common/test:testOnly
11[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
12[info] No tests to run for jobtreks-playground/test:testOnly
13[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
14[info] No tests to run for jobtreks-frontend/test:testOnly
15[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
16[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
17[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
18[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
19[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
20[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
21[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
22[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
23[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
24[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
25[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
26[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
27[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
28[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
29[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
30[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
31[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
32[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
33[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
34[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
35[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
36[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
37[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
38[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
39[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
40[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
41[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
42[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
43[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
44[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
45[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
46[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
47[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
48[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
49[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
50[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
51[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
52[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
53[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
54[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
55[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
56[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
57[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
58[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
59[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
60[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
61[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
62[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
63[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
64[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
65[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
66[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
67[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
68[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
69[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
70[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
71[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
72[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
73[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
74[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
75[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
76[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
77[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
78[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
79[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
80[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
81[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
82[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
83[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
84[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
85[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
86[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
87[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
88[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
89[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
90[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
91[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
92[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
93[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
94[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
95[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
96[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
97[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
98[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
99[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
100[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
101[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
102[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
103[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
104[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
105[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
106[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
107[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
108[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
109[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
110[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
111[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
112[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
113[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
114[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
115[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
116[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
117[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
118[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
119[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
120[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
121[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
122[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','mb8x9vhu','8kenypon','9cetl98o@yahoo.com','1bn1avzo',false,false,true,1,'a','admin')
123[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','oi0262fb','1xbq6le3','r4kirdy3@yahoo.com','yjqhmyt4',false,false,true,1,'a','user')
124[debug] c.j.b.PreparedStatementHandle - insert into "company" ("company_name","promote","logo","website","stock","excerpt","news_feed","active") values ('Google',true,'','http://google.com','','Google Inc. is an American multinational technology company specializing in Internet-related services and products. These include online advertising technologies, search, cloud computing, and software','http://www.bing.com/news/search?q=google&FORM=HDRSC4&format=RSS',true)
125[debug] c.j.b.PreparedStatementHandle - insert into "company" ("company_name","promote","logo","website","stock","excerpt","news_feed","active") values ('Apple',true,'','http://apple.com','','Apple Inc. is an American multinational technology company headquartered in Cupertino, California, that designs, develops, and sells consumer electronics, computer software, and online services.','http://www.bing.com/news/search?q=Apple+Inc&FORM=HDRSC4&format=RSS',true)
126[debug] c.j.b.PreparedStatementHandle - insert into "alert" ("title","message","payload","profile_id","alert_type","unread","created_at","expires_at") values ('New Company Added','Google added ',{"company":{"companyId":1,"name":"Google","promote":true,"logo":"","website":"http://google.com","stock":null,"excerpt":"Google Inc. is an American multinational technology company specializing in Internet-related services and products. These include online advertising technologies, search, cloud computing, and software","feed":"http://www.bing.com/news/search?q=google&FORM=HDRSC4&format=RSS","active":true}},2,'new_company_added',true,2015-09-24 15:21:25.424000-0500,'[SQL NULL of type 1111]')
127[debug] c.j.b.PreparedStatementHandle - insert into "alert" ("title","message","payload","profile_id","alert_type","unread","created_at","expires_at") values ('New Company Added','Apple added ',{"company":{"companyId":2,"name":"Apple","promote":true,"logo":"","website":"http://apple.com","stock":null,"excerpt":"Apple Inc. is an American multinational technology company headquartered in Cupertino, California, that designs, develops, and sells consumer electronics, computer software, and online services.","feed":"http://www.bing.com/news/search?q=Apple+Inc&FORM=HDRSC4&format=RSS","active":true}},2,'new_company_added',true,2015-09-24 15:21:25.525000-0500,'[SQL NULL of type 1111]')
128[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
129[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
130[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
131[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
132[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
133[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
134[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
135[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
136[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
137[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
138[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
139[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
140[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
141[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
142[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
143[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
144[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
145[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
146[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
147[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
148[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
149[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
150[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
151[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
152[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
153[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
154[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
155[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
156[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
157[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
158[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
159[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
160[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
161[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
162[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
163[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
164[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
165[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
166[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
167[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
168[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
169[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
170[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
171[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
172[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
173[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
174[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
175[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
176[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
177[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
178[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
179[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
180[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
181[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
182[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
183[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
184[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
185[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
186[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
187[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
188[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
189[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
190[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
191[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
192[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
193[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
194[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
195[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
196[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
197[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
198[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
199[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
200[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
201[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
202[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
203[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
204[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
205[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
206[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
207[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
208[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
209[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
210[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
211[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
212[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
213[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
214[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
215[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
216[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
217[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
218[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
219[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
220[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
221[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
222[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
223[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
224[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
225[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
226[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
227[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
228[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
229[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
230[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
231[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
232[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
233[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
234[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
235[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
236[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
237[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
238[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
239[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
240[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
241[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
242[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
243[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
244[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
245[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
246[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
247[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
248[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
249[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
250[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
251[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
252[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
253[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
254[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
255[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
256[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
257[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
258[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
259[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
260[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
261[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
262[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
263[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
264[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
265[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
266[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
267[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
268[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
269[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
270[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
271[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
272[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
273[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
274[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
275[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
276[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
277[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
278[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
279[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
280[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
281[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
282[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
283[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
284[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
285[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
286[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
287[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
288[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
289[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
290[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
291[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
292[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
293[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
294[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
295[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
296[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
297[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
298[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
299[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
300[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
301[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
302[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
303[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
304[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
305[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
306[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
307[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
308[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
309[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
310[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
311[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
312[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
313[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
314[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
315[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
316[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
317[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
318[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
319[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
320[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
321[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
322[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
323[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
324[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
325[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
326[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
327[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
328[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
329[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
330[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
331[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
332[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
333[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
334[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
335[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
336[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
337[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
338[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
339[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
340[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
341[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
342[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
343[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
344[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
345[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
346[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
347[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
348[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
349[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
350[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
351[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
352[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
353[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
354[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
355[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
356[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
357[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
358[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
359[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
360[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
361[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
362[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
363[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
364[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
365[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
366[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
367[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
368[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
369[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
370[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
371[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
372[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
373[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
374[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
375[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
376[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
377[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
378[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
379[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
380[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
381[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
382[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
383[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
384[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
385[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
386[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
387[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
388[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
389[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
390[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
391[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
392[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
393[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
394[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
395[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
396[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
397[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
398[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
399[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
400[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
401[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
402[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
403[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
404[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
405[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
406[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
407[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
408[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
409[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
410[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
411[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
412[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
413[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
414[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
415[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
416[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
417[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
418[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
419[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
420[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
421[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
422[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
423[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
424[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
425[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
426[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
427[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
428[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
429[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
430[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
431[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
432[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
433[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
434[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
435[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
436[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
437[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
438[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
439[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
440[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
441[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
442[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
443[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
444[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
445[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
446[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
447[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
448[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
449[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
450[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
451[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
452[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
453[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
454[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
455[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
456[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
457[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
458[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
459[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
460[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
461[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
462[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
463[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
464[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
465[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
466[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
467[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
468[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
469[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
470[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
471[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
472[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
473[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
474[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
475[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
476[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
477[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
478[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
479[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
480[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
481[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
482[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
483[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
484[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
485[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
486[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
487[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
488[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
489[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
490[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
491[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
492[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
493[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
494[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
495[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
496[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
497[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
498[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
499[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
500[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
501[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
502[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
503[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
504[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
505[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
506[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
507[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
508[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
509[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
510[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
511[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
512[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
513[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
514[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
515[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
516[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
517[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
518[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
519[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
520[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
521[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
522[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
523[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
524[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
525[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
526[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
527[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
528[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
529[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
530[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
531[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
532[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
533[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
534[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
535[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
536[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
537[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
538[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
539[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
540[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
541[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
542[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
543[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
544[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
545[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
546[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
547[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
548[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
549[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
550[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
551[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
552[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
553[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
554[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
555[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
556[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
557[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
558[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
559[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
560[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
561[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
562[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
563[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
564[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
565[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
566[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
567[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
568[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
569[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
570[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
571[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
572[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
573[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
574[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
575[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
576[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
577[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
578[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
579[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
580[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
581[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
582[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
583[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
584[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
585[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
586[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
587[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
588[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
589[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
590[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
591[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
592[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
593[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
594[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
595[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
596[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
597[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
598[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
599[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
600[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
601[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
602[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
603[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
604[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
605[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
606[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
607[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
608[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
609[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
610[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
611[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
612[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
613[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
614[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
615[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
616[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
617[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
618[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
619[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
620[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
621[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
622[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
623[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
624[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
625[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
626[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
627[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
628[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
629[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
630[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
631[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
632[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
633[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
634[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
635[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
636[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
637[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
638[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
639[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
640[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
641[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
642[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
643[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
644[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
645[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
646[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
647[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
648[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
649[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
650[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
651[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
652[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
653[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
654[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
655[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
656[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
657[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
658[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
659[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
660[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
661[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
662[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
663[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
664[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
665[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
666[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
667[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
668[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
669[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
670[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
671[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
672[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
673[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
674[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
675[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
676[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
677[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
678[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
679[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
680[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
681[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
682[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
683[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
684[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
685[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
686[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
687[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
688[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
689[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
690[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
691[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
692[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
693[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
694[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
695[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
696[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
697[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
698[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
699[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
700[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
701[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
702[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
703[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
704[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
705[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
706[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
707[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
708[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
709[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
710[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
711[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
712[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
713[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
714[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
715[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
716[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
717[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
718[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
719[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
720[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
721[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
722[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
723[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
724[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
725[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
726org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pg_extension_name_index"
727 Detail: Key (extname)=(unaccent) already exists.
728 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
729 at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
730 at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
731 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
732 at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
733 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
734 at com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:140)
735 at scala.slick.jdbc.StatementInvoker.results(StatementInvoker.scala:38)
736 at scala.slick.jdbc.StatementInvoker.iteratorTo(StatementInvoker.scala:22)
737 at scala.slick.jdbc.Invoker$class.iterator(Invoker.scala:15)
738 at scala.slick.jdbc.StatementInvoker.iterator(StatementInvoker.scala:16)
739 at scala.slick.jdbc.Invoker$class.execute(Invoker.scala:23)
740 at scala.slick.jdbc.StatementInvoker.execute(StatementInvoker.scala:16)
741 at test.PlaySpec$WithDefault$$anonfun$before$1$$anonfun$apply$1.apply(PlaySpec.scala:258)
742 at test.PlaySpec$WithDefault$$anonfun$before$1$$anonfun$apply$1.apply(PlaySpec.scala:258)
743 at test.ScriptRunner$$anonfun$apply$5.apply(ScriptRunner.scala:44)
744 at test.ScriptRunner$$anonfun$apply$5.apply(ScriptRunner.scala:28)
745 at scala.collection.immutable.Stream.foreach(Stream.scala:547)
746 at test.ScriptRunner.apply(ScriptRunner.scala:28)
747 at test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:257)
748 at test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
749 at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withSession(DatabaseComponent.scala:34)
750 at scala.slick.jdbc.PlayDatabase.withSession(PlayDatabase.scala:6)
751 at test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
752 at test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
753 at test.PlaySpec$WithUser.before(PlaySpec.scala:180)
754 at test.PlaySpec$WithUser.before(PlaySpec.scala:176)
755 at test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
756 at org.specs2.execute.ResultExecution$class.execute(ResultExecution.scala:22)
757 at org.specs2.execute.ResultExecution$.execute(ResultExecution.scala:116)
758 at org.specs2.execute.Result$$anon$10.asResult(Result.scala:218)
759 at org.specs2.execute.AsResult$.apply(Result.scala:253)
760 at org.specs2.execute.AsResult$$anonfun$effectively$1.apply(Result.scala:256)
761 at org.specs2.execute.AsResult$$anonfun$effectively$1.apply(Result.scala:256)
762 at org.specs2.execute.ResultExecution$class.effectively(ResultExecution.scala:38)
763 at org.specs2.execute.ResultExecution$.effectively(ResultExecution.scala:116)
764 at org.specs2.execute.AsResult$.effectively(Result.scala:256)
765 at play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
766 at play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
767 at play.api.test.PlayRunners$class.running(Helpers.scala:49)
768 at play.api.test.Helpers$.running(Helpers.scala:403)
769 at play.api.test.WithApplication.around(Specs.scala:23)
770 at test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
771 at test.BeforeWithinAround$class.around(PlaySpec.scala:295)
772 at test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
773 at org.specs2.mutable.Around$$anonfun$delayedInit$1.apply(Around.scala:13)
774 at org.specs2.mutable.Around$$anonfun$delayedInit$1.apply(Around.scala:13)
775 at org.specs2.execute.ResultExecution$class.effectively(ResultExecution.scala:38)
776 at org.specs2.execute.ResultExecution$.effectively(ResultExecution.scala:116)
777 at org.specs2.mutable.Around$class.delayedInit(Around.scala:13)
778 at play.api.test.WithApplication.delayedInit(Specs.scala:20)
779 at controllers.admin.ProfilesSpec$$anonfun$28$$anonfun$apply$10$$anon$7.<init>(ProfilesSpec.scala:57)
780 at controllers.admin.ProfilesSpec$$anonfun$28$$anonfun$apply$10.apply(ProfilesSpec.scala:57)
781 at controllers.admin.ProfilesSpec$$anonfun$28$$anonfun$apply$10.apply(ProfilesSpec.scala:57)
782 at org.specs2.matcher.Scope$$anon$3.asResult(ThrownExpectations.scala:120)
783 at org.specs2.execute.AsResult$.apply(Result.scala:253)
784 at org.specs2.specification.Example$$anonfun$apply$1.apply(Fragment.scala:209)
785 at org.specs2.specification.Example$$anonfun$apply$1.apply(Fragment.scala:209)
786 at org.specs2.specification.Example.execute(Fragment.scala:176)
787 at org.specs2.specification.FragmentExecution$$anonfun$1.apply(FragmentExecution.scala:46)
788 at org.specs2.specification.FragmentExecution$$anonfun$1.apply(FragmentExecution.scala:46)
789 at org.specs2.execute.ResultExecution$class.execute(ResultExecution.scala:22)
790 at org.specs2.execute.ResultExecution$.execute(ResultExecution.scala:116)
791 at org.specs2.specification.FragmentExecution$class.executeBody(FragmentExecution.scala:28)
792 at org.specs2.reporter.SbtConsoleReporter.executeBody(SbtReporter.scala:20)
793 at org.specs2.specification.FragmentExecution$class.execute(FragmentExecution.scala:46)
794 at org.specs2.reporter.SbtConsoleReporter.execute(SbtReporter.scala:20)
795 at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1$$anonfun$apply$1.apply(FragmentExecution.scala:35)
796 at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1$$anonfun$apply$1.apply(FragmentExecution.scala:35)
797 at org.specs2.control.Exceptions$class.catchAllOr(Exceptions.scala:54)
798 at org.specs2.control.Exceptions$.catchAllOr(Exceptions.scala:109)
799 at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1.apply(FragmentExecution.scala:35)
800 at org.specs2.specification.FragmentExecution$$anonfun$executeFragment$1.apply(FragmentExecution.scala:35)
801 at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$executeSequentially$1.apply(ExecutionStrategy.scala:104)
802 at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$executeSequentially$1.apply(ExecutionStrategy.scala:104)
803 at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
804 at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
805 at scala.collection.immutable.List.foreach(List.scala:318)
806 at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
807 at scala.collection.AbstractTraversable.map(Traversable.scala:105)
808 at org.specs2.reporter.DefaultExecutionStrategy$class.executeSequentially(ExecutionStrategy.scala:104)
809 at org.specs2.reporter.SbtConsoleReporter.executeSequentially(SbtReporter.scala:20)
810 at org.specs2.reporter.DefaultExecutionStrategy$class.executeSequence(ExecutionStrategy.scala:98)
811 at org.specs2.reporter.SbtConsoleReporter.executeSequence(SbtReporter.scala:20)
812 at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1$$anonfun$2.apply(ExecutionStrategy.scala:43)
813 at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1$$anonfun$2.apply(ExecutionStrategy.scala:41)
814 at scala.collection.immutable.Stream.foldLeft(Stream.scala:563)
815 at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1.apply(ExecutionStrategy.scala:41)
816 at org.specs2.reporter.DefaultExecutionStrategy$$anonfun$execute$1.apply(ExecutionStrategy.scala:38)
817 at scalaz.syntax.IdOps$class.$bar$greater(IdOps.scala:15)
818 at scalaz.syntax.ToIdOps$$anon$1.$bar$greater(IdOps.scala:82)
819 at org.specs2.reporter.AllExporting$class.report(AllExporting.scala:17)
820 at org.specs2.reporter.SbtConsoleReporter.report(SbtReporter.scala:20)
821 at org.specs2.runner.SbtRunner.org$specs2$runner$SbtRunner$$specificationRun(SbtRunner.scala:75)
822 at org.specs2.runner.SbtRunner$$anonfun$newTask$1$$anon$5.execute(SbtRunner.scala:59)
823 at sbt.ForkMain$Run$2.call(ForkMain.java:294)
824 at sbt.ForkMain$Run$2.call(ForkMain.java:284)
825 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
826 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
827 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
828 at java.lang.Thread.run(Thread.java:744)
829[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
830[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
831[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
832[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
833[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
834[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
835[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
836[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
837[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
838[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
839[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
840[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
841[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
842[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
843[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
844[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
845[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
846[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
847[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
848[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
849[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
850[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
851[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
852[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
853[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
854[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
855[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
856[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
857[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
858[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
859[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
860[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
861[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
862[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
863[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
864[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
865[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
866[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
867[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
868[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
869[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
870[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
871[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
872[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
873[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
874[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
875[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
876[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
877[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
878[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
879[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
880[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
881[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
882[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
883[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
884[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
885[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
886[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
887[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
888[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
889[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
890[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
891[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
892[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
893[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
894[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
895[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
896[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
897[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
898[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
899[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
900[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
901[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
902[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
903[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
904[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
905[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
906[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
907[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
908[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
909[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
910[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
911[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
912[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
913[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
914[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
915[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
916[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
917[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
918[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
919[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
920[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
921[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
922[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
923[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
924[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
925[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
926[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
927[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
928[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
929[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
930[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
931[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
932[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
933[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
934[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
935[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
936[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
937[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
938[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
939[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
940[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
941[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
942[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
943[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
944[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
945[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
946[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
947[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
948[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
949[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
950[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
951[info] AlertsSpec
952[info]
953[info] Alerts#index should
954[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
955[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
956[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
957[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
958[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
959[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
960[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
961[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
962[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
963[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
964[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
965[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
966[info] + be routed at /api/alerts
967[info] ! should return a collection of alerts
968[error] PSQLException: : ERROR: relation "site" does not exist
969[error] Position: 13 (QueryExecutorImpl.java:2198)
970[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
971[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
972[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
973[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
974[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
975[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
976[error] com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)
977[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:269)
978[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
979[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
980[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
981[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
982[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
983[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
984[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
985[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
986[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
987[error] play.api.test.Helpers$.running(Helpers.scala:403)
988[error] play.api.test.WithApplication.around(Specs.scala:23)
989[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
990[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
991[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
992[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
993[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$3$$anon$2.<init>(AlertsSpec.scala:43)
994[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$3.apply(AlertsSpec.scala:43)
995[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$3.apply(AlertsSpec.scala:43)
996[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
997[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
998[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
999[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1000[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1001[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1002[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1003[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1004[info]
1005[info] ! should return user requested amount
1006[error] PSQLException: : ERROR: relation "site" does not exist
1007[error] Position: 13 (QueryExecutorImpl.java:2198)
1008[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
1009[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
1010[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
1011[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
1012[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
1013[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
1014[error] com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)
1015[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:269)
1016[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
1017[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
1018[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
1019[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
1020[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1021[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1022[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1023[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1024[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1025[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1026[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1027[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1028[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1029[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1030[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1031[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1032[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
1033[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
1034[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
1035[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
1036[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
1037[error] play.api.test.Helpers$.running(Helpers.scala:403)
1038[error] play.api.test.WithApplication.around(Specs.scala:23)
1039[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
1040[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
1041[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
1042[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
1043[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$5$$anon$3.<init>(AlertsSpec.scala:52)
1044[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$5.apply(AlertsSpec.scala:52)
1045[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$5.apply(AlertsSpec.scala:52)
1046[info]
1047[info] ! should paginate results
1048[error] PSQLException: : ERROR: relation "site" does not exist
1049[error] Position: 13 (QueryExecutorImpl.java:2198)
1050[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
1051[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
1052[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
1053[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
1054[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
1055[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
1056[error] com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)
1057[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:269)
1058[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
1059[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
1060[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
1061[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
1062[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
1063[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
1064[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
1065[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
1066[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
1067[error] play.api.test.Helpers$.running(Helpers.scala:403)
1068[error] play.api.test.WithApplication.around(Specs.scala:23)
1069[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
1070[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
1071[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
1072[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
1073[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$6$$anon$4.<init>(AlertsSpec.scala:65)
1074[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$6.apply(AlertsSpec.scala:65)
1075[error] controllers.api.AlertsSpec$$anonfun$11$$anonfun$apply$6.apply(AlertsSpec.scala:65)
1076[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1077[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1078[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1079[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1080[info]
1081[info]
1082[info] Alerts#dismiss should
1083[info] ! be routed at DELETE /alerts
1084[error] PSQLException: : ERROR: relation "site" does not exist
1085[error] Position: 13 (QueryExecutorImpl.java:2198)
1086[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
1087[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
1088[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
1089[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
1090[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
1091[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
1092[error] com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)
1093[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:269)
1094[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
1095[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
1096[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
1097[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
1098[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
1099[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
1100[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
1101[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
1102[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
1103[error] play.api.test.Helpers$.running(Helpers.scala:403)
1104[error] play.api.test.WithApplication.around(Specs.scala:23)
1105[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
1106[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
1107[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
1108[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
1109[error] controllers.api.AlertsSpec$$anonfun$18$$anonfun$apply$8$$anon$5.<init>(AlertsSpec.scala:83)
1110[error] controllers.api.AlertsSpec$$anonfun$18$$anonfun$apply$8.apply(AlertsSpec.scala:83)
1111[error] controllers.api.AlertsSpec$$anonfun$18$$anonfun$apply$8.apply(AlertsSpec.scala:83)
1112[info]
1113[info]
1114[info] Total for specification AlertsSpec
1115[info] Finished in 25 seconds, 109 ms
1116[info] 5 examples, 0 failure, 4 errors
1117[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1118[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1119[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1120[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1121[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1122[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1123[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1124[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1125[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1126[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1127[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1128[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1129[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1130[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1131[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1132[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1133[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1134[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1135[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1136[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1137[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1138[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1139[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1140[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1141[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1142[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1143[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1144[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1145[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1146[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1147[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1148[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1149[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1150[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1151[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1152[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1153[error] Error: Total 5, Failed 0, Errors 4, Passed 1
1154[error] Error during tests:
1155[error] controllers.api.AlertsSpec
1156[debug] c.j.b.PreparedStatementHandle - insert into "token" ("first_name","last_name","uuid","email","created_at","expires_on","signup","site_id") values ('dummy','user','82210de6-b6e6-4ce7-b20b-06e331907f53','dummy@yahoo.com',2015-09-24 15:21:17.433000-0500,2015-09-24 15:21:17.574000-0500,true,1)
1157[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
1158[info] No tests to run for jobtreks/test:testOnly
1159[debug] c.j.b.PreparedStatementHandle - delete from "token" where "token"."uuid" = '82210de6-b6e6-4ce7-b20b-06e331907f53'
1160[debug] c.j.b.PreparedStatementHandle - select x2."first_name", x2."last_name", x2."uuid", x2."email", x2."created_at", x2."expires_on", x2."signup", x2."site_id" from "token" x2 where x2."uuid" = '82210de6-b6e6-4ce7-b20b-06e331907f53'
1161[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1162[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1163[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1164[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1165[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1166[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1167[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1168[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1169[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1170[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1171[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1172[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1173[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1174[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1175[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1176[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1177[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1178[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1179[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1180[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1181[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1182[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1183[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1184[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1185[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1186[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1187[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1188[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1189[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1190[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1191[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1192[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1193[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1194[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1195[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1196[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1197[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1198[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1199[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1200[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1201[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1202[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1203[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1204[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1205[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1206[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1207[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1208[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1209[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1210[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1211[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1212[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1213[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1214[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1215[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1216[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1217[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1218[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1219[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1220[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1221[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1222[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1223[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1224[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1225[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1226[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1227[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1228[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1229[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1230[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1231[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1232[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1233[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1234[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1235[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1236[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1237[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1238[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1239[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1240[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1241[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1242[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1243[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1244[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1245[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1246[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1247[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1248[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1249[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1250[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1251[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1252[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1253[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1254[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1255[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1256[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1257[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1258[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1259[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1260[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1261[debug] c.j.b.PreparedStatementHandle - delete from "token" where "token"."uuid" = '82210de6-b6e6-4ce7-b20b-06e331907f53'
1262[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1263[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1264[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1265[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1266[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1267[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1268[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1269[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1270[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1271[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1272[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1273[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1274[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1275[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1276[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1277[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1278[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1279[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1280[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1281[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1282[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1283[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1284[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1285[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1286[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1287[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1288[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1289[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1290[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1291[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1292[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1293[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1294[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1295[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1296[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1297[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1298[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1299[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1300[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1301[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1302[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1303[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1304[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1305[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1306[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1307[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1308[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1309[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1310[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1311[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1312[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1313[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1314[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1315[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1316[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1317[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1318[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1319[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1320[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1321[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1322[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1323[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1324[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1325[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1326[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1327[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1328[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1329[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1330[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1331[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1332[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1333[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1334[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1335[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1336[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1337[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1338[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1339[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1340[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1341[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1342[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1343[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1344[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1345[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1346[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1347[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1348[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1349[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1350[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1351[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1352[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1353[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1354[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1355[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1356[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1357[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1358[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1359[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1360[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1361[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1362[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1363[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1364[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1365[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1366[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1367[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1368[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1369[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1370[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1371[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1372[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1373[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1374[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1375[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1376[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1377[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1378[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1379[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1380[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1381[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1382[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1383[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1384[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1385[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1386[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1387[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1388[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1389[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1390[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1391[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1392[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1393[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1394[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1395[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1396[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1397[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1398[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1399[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1400[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1401[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1402[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1403[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1404[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1405[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1406[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1407[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1408[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1409[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1410[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1411[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1412[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1413[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1414[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1415[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1416[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1417[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1418[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1419[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1420[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1421[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1422[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1423[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1424[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1425[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1426[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1427[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1428[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1429[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1430[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1431[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1432[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1433[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1434[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1435[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1436[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1437[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1438[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1439[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1440[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1441[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1442[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1443[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1444[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1445[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1446[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1447[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1448[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1449[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1450[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1451[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1452[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1453[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1454[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1455[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1456[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1457[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1458[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1459[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1460[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1461[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1462[debug] c.j.b.PreparedStatementHandle - insert into "token" ("first_name","last_name","uuid","email","created_at","expires_on","signup","site_id") values ('dummy','user','82210de6-b6e6-4ce7-b20b-06e331907f53','dummy@yahoo.com',2015-09-24 15:21:17.433000-0500,2015-09-24 15:21:17.574000-0500,true,1)
1463[debug] c.j.b.PreparedStatementHandle - select x2.x3 from (select count(1) as x3 from (select x4."first_name" as x5, x4."uuid" as x6, x4."signup" as x7, x4."email" as x8, x4."created_at" as x9, x4."site_id" as x10, x4."expires_on" as x11, x4."last_name" as x12 from "token" x4) x13) x2
1464[debug] c.j.b.PreparedStatementHandle - select x2.x3, x2.x4, x2.x5, x2.x6, x2.x7, x2.x8, x2.x9, x2.x10, x2.x11, x2.x12, x2.x13, x2.x14, x2.x15 from (select x16.x17 as x3, x16.x18 as x5, x16.x19 as x9, x16.x20 as x6, x16.x21 as x7, x16.x22 as x10, x16.x23 as x8, x16.x24 as x4, x25.x26 as x15, x25.x27 as x14, x25.x28 as x13, x25.x29 as x11, x25.x30 as x12 from (select x31."first_name" as x17, x31."uuid" as x18, x31."signup" as x19, x31."email" as x20, x31."created_at" as x21, x31."site_id" as x22, x31."expires_on" as x23, x31."last_name" as x24 from "token" x31) x16 inner join (select x32."logo_on_signup" as x26, x32."sidebar_image" as x27, x32."logo" as x28, x32."site_id" as x29, x32."site_name" as x30 from "site" x32) x25 on x16.x22 = x25.x29 limit 50) x2
1465[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1466[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1467[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1468[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1469[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1470[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1471[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1472[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1473[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1474[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1475[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1476[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1477[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1478[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1479[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1480[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1481[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1482[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1483[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1484[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1485[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1486[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1487[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1488[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1489[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1490[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1491[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1492[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1493[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1494[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1495[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1496[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1497[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1498[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1499[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1500[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1501[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1502[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1503[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1504[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1505[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1506[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1507[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1508[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1509[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1510[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1511[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1512[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1513[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1514[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1515[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1516[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1517[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1518[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1519[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1520[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1521[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1522[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1523[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1524[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1525[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1526[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1527[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1528[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1529[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1530[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1531[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1532[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1533[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1534[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1535[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1536[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1537[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1538[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1539[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1540[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1541[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1542[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1543[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1544[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1545[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1546[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1547[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1548[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1549[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1550[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1551[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1552[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1553[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1554[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1555[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1556[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1557[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1558[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1559[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1560[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1561[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1562[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1563[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1564[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1565[debug] c.j.b.PreparedStatementHandle - insert into "accepted_invite" ("profile_id","created_at") values (2,2015-09-24)
1566[debug] c.j.b.PreparedStatementHandle - select x2.x3 from (select count(1) as x3 from (select x4."profile_id" as x5, x4."created_at" as x6 from "accepted_invite" x4) x7) x2
1567[debug] c.j.b.PreparedStatementHandle - select x2.x3, x2.x4, x2.x5, x2.x6, x2.x7, x2.x8, x2.x9, x2.x10, x2.x11, x2.x12, x2.x13, x2.x14, x2.x15, x2.x16, x2.x17, x2.x18, x2.x19, x2.x20, x2.x21, x2.x22 from (select x23.x24 as x3, x23.x25 as x4, x23.x26 as x17, x23.x27 as x6, x23.x28 as x14, x23.x29 as x5, x23.x30 as x16, x23.x31 as x9, x23.x32 as x10, x23.x33 as x13, x23.x34 as x15, x23.x35 as x11, x23.x36 as x7, x23.x37 as x12, x23.x38 as x8, x39.x40 as x22, x39.x41 as x21, x39.x42 as x20, x39.x43 as x18, x39.x44 as x19 from (select x45.x46 as x24, x45.x47 as x25, x48.x49 as x26, x48.x50 as x27, x48.x51 as x28, x48.x52 as x29, x48.x53 as x30, x48.x54 as x31, x48.x55 as x32, x48.x56 as x33, x48.x57 as x34, x48.x58 as x35, x48.x59 as x36, x48.x60 as x37, x48.x61 as x38 from (select x62."profile_id" as x46, x62."created_at" as x47 from "accepted_invite" x62) x45 inner join (select x63."permission" as x49, x63."first_name" as x50, x63."active" as x51, x63."profile_id" as x52, x63."partner_code" as x53, x63."email" as x54, x63."password" as x55, x63."email_notification" as x56, x63."site_id" as x57, x63."picture" as x58, x63."last_name" as x59, x63."push_notification" as x60, x63."user_name" as x61 from "profile" x63) x48 on x45.x46 = x48.x52) x23 inner join (select x64."logo_on_signup" as x40, x64."sidebar_image" as x41, x64."logo" as x42, x64."site_id" as x43, x64."site_name" as x44 from "site" x64) x39 on x23.x34 = x39.x43 limit 50) x2
1568[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1569[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1570[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1571[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1572[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1573[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1574[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1575[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1576[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1577[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1578[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1579[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1580[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1581[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1582[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1583[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1584[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1585[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1586[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1587[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1588[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1589[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1590[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1591[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1592[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1593[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1594[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1595[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1596[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1597[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1598[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1599[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1600[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1601[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1602[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1603[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1604[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1605[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1606[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1607[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1608[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1609[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1610[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1611[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1612[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1613[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1614[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1615[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1616[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1617[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1618[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1619[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1620[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1621[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1622[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1623[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1624[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1625[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1626[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1627[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1628[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1629[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1630[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1631[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1632[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1633[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1634[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1635[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1636[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1637[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1638[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1639[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1640[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1641[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1642[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1643[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1644[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1645[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1646[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1647[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1648[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1649[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1650[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1651[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1652[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1653[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1654[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1655[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1656[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1657[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1658[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1659[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1660[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1661[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1662[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1663[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1664[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1665[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1666[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1667[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1668[debug] c.j.b.PreparedStatementHandle - update "profile" set "permission" = 'admin' where "profile"."profile_id" = 5
1669[debug] c.j.b.PreparedStatementHandle - select s3."profile_id", s3."first_name", s3."last_name", s3."user_name", s3."email", s3."password", s3."picture", s3."push_notification", s3."email_notification", s3."active", s3."site_id", s3."partner_code", s3."permission" from "profile" s3 where s3."profile_id" = 5
1670[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1671[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1672[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1673[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1674[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1675[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1676[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1677[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1678[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1679[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1680[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1681[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1682[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1683[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1684[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1685[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1686[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1687[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1688[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1689[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1690[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1691[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1692[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1693[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1694[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1695[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1696[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1697[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1698[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1699[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1700[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1701[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1702[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1703[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1704[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1705[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1706[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1707[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1708[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1709[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1710[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1711[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1712[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1713[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1714[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1715[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1716[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1717[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1718[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1719[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1720[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1721[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1722[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1723[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1724[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1725[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1726[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1727[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1728[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1729[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1730[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1731[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1732[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1733[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1734[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1735[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1736[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1737[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1738[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1739[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1740[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1741[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1742[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1743[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1744[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1745[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1746[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1747[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1748[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1749[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1750[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1751[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1752[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1753[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1754[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1755[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1756[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1757[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1758[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1759[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1760[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1761[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1762[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1763[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1764[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1765[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1766[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1767[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1768[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1769[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1770[debug] c.j.b.PreparedStatementHandle - update "profile" set "permission" = 'admin' where "profile"."profile_id" = 2
1771[debug] c.j.b.PreparedStatementHandle - select x2."profile_id", x2."first_name", x2."last_name", x2."user_name", x2."email", x2."password", x2."picture", x2."push_notification", x2."email_notification", x2."active", x2."site_id", x2."partner_code", x2."permission" from "profile" x2 where x2."profile_id" = 2
1772[debug] c.j.b.PreparedStatementHandle - select x2."profile_id", x2."first_name", x2."last_name", x2."user_name", x2."email", x2."password", x2."picture", x2."push_notification", x2."email_notification", x2."active", x2."site_id", x2."partner_code", x2."permission" from "profile" x2 where (x2."profile_id" = 2) and (x2."active" = true)
1773[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1774[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1775[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1776[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1777[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1778[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1779[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1780[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1781[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1782[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1783[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1784[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1785[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1786[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1787[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1788[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1789[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1790[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1791[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1792[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1793[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1794[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1795[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1796[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1797[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1798[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1799[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1800[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1801[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1802[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1803[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1804[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1805[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1806[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1807[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1808[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1809[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1810[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1811[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1812[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1813[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1814[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1815[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1816[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1817[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1818[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1819[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1820[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1821[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1822[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1823[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1824[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1825[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1826[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1827[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1828[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1829[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1830[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1831[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1832[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1833[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1834[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1835[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1836[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1837[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1838[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1839[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1840[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1841[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1842[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1843[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1844[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1845[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1846[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1847[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1848[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1849[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1850[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1851[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1852[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1853[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1854[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1855[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1856[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1857[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1858[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1859[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1860[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1861[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1862[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1863[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1864[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1865[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1866[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1867[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1868[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1869[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1870[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1871[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1872[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1873[debug] c.j.b.PreparedStatementHandle - select x2.x3 from (select count(1) as x3 from (select x4."permission" as x5, x4."first_name" as x6, x4."active" as x7, x4."profile_id" as x8, x4."partner_code" as x9, x4."email" as x10, x4."password" as x11, x4."email_notification" as x12, x4."site_id" as x13, x4."picture" as x14, x4."last_name" as x15, x4."push_notification" as x16, x4."user_name" as x17 from "profile" x4 where x4."permission" = 'admin') x18) x2
1874[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1875[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1876[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1877[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1878[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1879[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1880[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1881[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1882[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1883[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1884[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1885[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1886[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1887[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1888[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1889[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1890[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1891[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1892[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1893[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1894[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1895[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1896[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1897[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1898[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
1899[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
1900[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
1901[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
1902[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
1903[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
1904[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
1905[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
1906[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
1907[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
1908[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
1909[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1910[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
1911[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
1912[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
1913[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
1914[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
1915[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
1916[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
1917[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
1918[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
1919[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
1920[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
1921[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
1922[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
1923[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
1924[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
1925[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
1926[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
1927[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1928[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
1929[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
1930[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
1931[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1932[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
1933[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
1934[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
1935[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
1936[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
1937[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
1938[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
1939[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
1940[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1941[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
1942[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1943[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
1944[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
1945[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
1946[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
1947[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
1948[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
1949[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1950[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
1951[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
1952[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
1953[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
1954[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
1955[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
1956[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1957[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
1958[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
1959[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
1960[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1961[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
1962[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1963[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
1964[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1965[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
1966[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
1967[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
1968[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
1969[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
1970[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
1971[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
1972[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
1973[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
1974[debug] c.j.b.PreparedStatementHandle - select x2.x3 from (select count(1) as x3 from (select x4."permission" as x5, x4."first_name" as x6, x4."active" as x7, x4."profile_id" as x8, x4."partner_code" as x9, x4."email" as x10, x4."password" as x11, x4."email_notification" as x12, x4."site_id" as x13, x4."picture" as x14, x4."last_name" as x15, x4."push_notification" as x16, x4."user_name" as x17 from "profile" x4 where x4."permission" = 'admin') x18) x2
1975[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
1976[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
1977[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
1978[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
1979[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
1980[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
1981[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
1982[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
1983[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
1984[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
1985[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
1986[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
1987[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
1988[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
1989[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
1990[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
1991[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
1992[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
1993[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
1994[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
1995[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
1996[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
1997[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
1998[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
1999[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
2000[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
2001[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
2002[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
2003[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
2004[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
2005[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
2006[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
2007[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
2008[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
2009[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
2010[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2011[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
2012[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
2013[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
2014[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
2015[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
2016[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
2017[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
2018[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
2019[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
2020[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
2021[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
2022[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
2023[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
2024[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
2025[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
2026[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
2027[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
2028[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2029[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2030[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
2031[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
2032[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2033[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
2034[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
2035[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
2036[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
2037[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2038[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
2039[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
2040[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2041[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2042[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
2043[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2044[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
2045[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
2046[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2047[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
2048[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
2049[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
2050[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2051[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
2052[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
2053[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2054[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
2055[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
2056[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
2057[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2058[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2059[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
2060[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
2061[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2062[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
2063[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2064[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
2065[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2066[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2067[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2068[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
2069[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
2070[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
2071[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
2072[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
2073[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
2074[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
2075[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin2','8e1sv067','b0s33ge4','1w91e5xc@yahoo.com','nk97vyz5',false,false,true,1,'a','admin')
2076[debug] c.j.b.PreparedStatementHandle - select x2.x3 from (select count(1) as x3 from (select x4."permission" as x5, x4."first_name" as x6, x4."active" as x7, x4."profile_id" as x8, x4."partner_code" as x9, x4."email" as x10, x4."password" as x11, x4."email_notification" as x12, x4."site_id" as x13, x4."picture" as x14, x4."last_name" as x15, x4."push_notification" as x16, x4."user_name" as x17 from "profile" x4 where x4."permission" = 'admin') x18) x2
2077[debug] c.j.b.PreparedStatementHandle - update "profile" set "permission" = 'user' where "profile"."profile_id" = 3
2078[debug] c.j.b.PreparedStatementHandle - select x2."profile_id", x2."first_name", x2."last_name", x2."user_name", x2."email", x2."password", x2."picture", x2."push_notification", x2."email_notification", x2."active", x2."site_id", x2."partner_code", x2."permission" from "profile" x2 where x2."profile_id" = 3
2079[debug] c.j.b.PreparedStatementHandle - select x2."profile_id", x2."first_name", x2."last_name", x2."user_name", x2."email", x2."password", x2."picture", x2."push_notification", x2."email_notification", x2."active", x2."site_id", x2."partner_code", x2."permission" from "profile" x2 where (x2."profile_id" = 3) and (x2."active" = true)
2080[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
2081[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
2082[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2083[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
2084[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
2085[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
2086[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
2087[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
2088[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
2089[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
2090[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
2091[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
2092[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
2093[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
2094[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
2095[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
2096[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
2097[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
2098[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
2099[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
2100[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
2101[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
2102[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
2103[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
2104[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
2105[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
2106[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
2107[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
2108[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
2109[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
2110[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
2111[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
2112[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
2113[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
2114[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
2115[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2116[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
2117[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
2118[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
2119[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
2120[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
2121[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
2122[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
2123[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
2124[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
2125[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
2126[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
2127[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
2128[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
2129[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
2130[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
2131[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
2132[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
2133[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2134[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2135[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
2136[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
2137[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2138[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
2139[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
2140[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
2141[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
2142[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2143[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
2144[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
2145[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2146[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2147[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
2148[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2149[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
2150[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
2151[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2152[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
2153[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
2154[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
2155[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2156[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
2157[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
2158[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2159[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
2160[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
2161[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
2162[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2163[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2164[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
2165[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
2166[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2167[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
2168[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2169[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
2170[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2171[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2172[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2173[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
2174[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
2175[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
2176[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
2177[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
2178[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
2179[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
2180[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
2181[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
2182[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2183[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
2184[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
2185[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
2186[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
2187[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
2188[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
2189[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
2190[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
2191[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
2192[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
2193[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
2194[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
2195[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
2196[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
2197[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
2198[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
2199[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
2200[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
2201[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
2202[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
2203[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
2204[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
2205[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
2206[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
2207[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
2208[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
2209[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
2210[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
2211[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
2212[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
2213[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
2214[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
2215[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2216[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
2217[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
2218[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
2219[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
2220[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
2221[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
2222[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
2223[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
2224[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
2225[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
2226[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
2227[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
2228[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
2229[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
2230[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
2231[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
2232[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
2233[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2234[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2235[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
2236[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
2237[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2238[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
2239[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
2240[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
2241[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
2242[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2243[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
2244[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
2245[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2246[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2247[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
2248[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2249[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
2250[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
2251[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2252[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
2253[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
2254[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
2255[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2256[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
2257[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
2258[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2259[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
2260[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
2261[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
2262[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2263[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2264[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
2265[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
2266[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2267[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
2268[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2269[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
2270[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2271[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2272[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2273[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
2274[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
2275[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
2276[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
2277[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
2278[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
2279[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
2280[debug] c.j.b.PreparedStatementHandle - select x2.x3 from (select count(1) as x3 from (select x4.x5 as x6, x4.x7 as x8, x4.x9 as x10, x4.x11 as x12, x4.x13 as x14, x4.x15 as x16, x4.x17 as x18, x4.x19 as x20, x4.x21 as x22, x4.x23 as x24, x25.x26 as x27 from (select x28.x29 as x21, x28.x30 as x9, x28.x31 as x5, x28.x32 as x7, x28.x33 as x13, x28.x34 as x23, x28.x35 as x11, x28.x36 as x15, x28.x37 as x17, x38.x39 as x19 from (select x40.x41 as x29, x40.x42 as x30, x40.x43 as x44, x40.x45 as x31, x40.x46 as x32, x40.x47 as x33, x40.x48 as x34, x40.x49 as x50, x40.x51 as x52, x40.x53 as x54, x40.x55 as x56, x40.x57 as x35, x40.x58 as x59, x40.x60 as x61, x62.x63 as x64, x62.x65 as x66, x62.x67 as x68, x62.x69 as x36, x62.x70 as x37 from (select x71."permission" as x41, x71."first_name" as x42, x71."active" as x43, x71."profile_id" as x45, x71."partner_code" as x46, x71."email" as x47, x71."created_at" as x48, x71."password" as x49, x71."email_notification" as x51, x71."site_id" as x53, x71."picture" as x55, x71."last_name" as x57, x71."push_notification" as x58, x71."user_name" as x60 from "profile" x71) x40 inner join (select x72."logo_on_signup" as x63, x72."sidebar_image" as x65, x72."logo" as x67, x72."site_id" as x69, x72."site_name" as x70 from "site" x72) x62 on x40.x53 = x62.x69) x28 left outer join (select x73."subscription_id" as x74, x73."active" as x75, x73."state" as x76, x73."expires_at" as x77, x73."profile_id" as x78, x73."created_at" as x79, x73."hear_about_us" as x39, x73."token_id" as x80, x73."cancelled_on" as x81, x73."account_id" as x82 from "profile_subscription" x73) x38 on x28.x31 = x38.x78) x4 left outer join (select x83."profile_id" as x84, x83."category_id" as x26 from "profile_category" x83) x25 on x4.x5 = x25.x84 order by x4.x9) x85) x2
2281[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
2282[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
2283[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2284[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
2285[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
2286[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
2287[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
2288[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
2289[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
2290[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
2291[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
2292[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
2293[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
2294[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
2295[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
2296[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
2297[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
2298[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
2299[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
2300[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
2301[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
2302[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
2303[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
2304[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
2305[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
2306[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
2307[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
2308[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
2309[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
2310[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
2311[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
2312[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
2313[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
2314[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
2315[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
2316[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2317[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
2318[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
2319[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
2320[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
2321[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
2322[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
2323[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
2324[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
2325[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
2326[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
2327[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
2328[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
2329[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
2330[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
2331[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
2332[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
2333[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
2334[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2335[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2336[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
2337[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
2338[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2339[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
2340[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
2341[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
2342[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
2343[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2344[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
2345[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
2346[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2347[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2348[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
2349[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2350[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
2351[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
2352[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2353[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
2354[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
2355[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
2356[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2357[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
2358[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
2359[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2360[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
2361[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
2362[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
2363[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2364[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2365[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
2366[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
2367[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2368[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
2369[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2370[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
2371[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2372[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2373[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2374[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
2375[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
2376[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
2377[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
2378[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
2379[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
2380[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
2381[debug] c.j.b.PreparedStatementHandle - select x2.x3 from (select count(1) as x3 from (select x4.x5 as x6, x4.x7 as x8, x4.x9 as x10, x4.x11 as x12, x4.x13 as x14, x4.x15 as x16, x4.x17 as x18, x4.x19 as x20, x4.x21 as x22, x4.x23 as x24, x25.x26 as x27 from (select x28.x29 as x21, x28.x30 as x9, x28.x31 as x5, x28.x32 as x7, x28.x33 as x13, x28.x34 as x23, x28.x35 as x11, x28.x36 as x15, x28.x37 as x17, x38.x39 as x19 from (select x40.x41 as x29, x40.x42 as x30, x40.x43 as x44, x40.x45 as x31, x40.x46 as x32, x40.x47 as x33, x40.x48 as x34, x40.x49 as x50, x40.x51 as x52, x40.x53 as x54, x40.x55 as x56, x40.x57 as x35, x40.x58 as x59, x40.x60 as x61, x62.x63 as x64, x62.x65 as x66, x62.x67 as x68, x62.x69 as x36, x62.x70 as x37 from (select x71."permission" as x41, x71."first_name" as x42, x71."active" as x43, x71."profile_id" as x45, x71."partner_code" as x46, x71."email" as x47, x71."created_at" as x48, x71."password" as x49, x71."email_notification" as x51, x71."site_id" as x53, x71."picture" as x55, x71."last_name" as x57, x71."push_notification" as x58, x71."user_name" as x60 from "profile" x71) x40 inner join (select x72."logo_on_signup" as x63, x72."sidebar_image" as x65, x72."logo" as x67, x72."site_id" as x69, x72."site_name" as x70 from "site" x72) x62 on x40.x53 = x62.x69) x28 left outer join (select x73."subscription_id" as x74, x73."active" as x75, x73."state" as x76, x73."expires_at" as x77, x73."profile_id" as x78, x73."created_at" as x79, x73."hear_about_us" as x39, x73."token_id" as x80, x73."cancelled_on" as x81, x73."account_id" as x82 from "profile_subscription" x73) x38 on x28.x31 = x38.x78) x4 left outer join (select x83."profile_id" as x84, x83."category_id" as x26 from "profile_category" x83) x25 on x4.x5 = x25.x84 order by x4.x9 desc) x85) x2
2382[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
2383[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
2384[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2385[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
2386[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
2387[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
2388[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
2389[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
2390[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
2391[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
2392[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
2393[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
2394[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
2395[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
2396[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
2397[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
2398[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
2399[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
2400[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
2401[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
2402[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
2403[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
2404[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
2405[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
2406[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
2407[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
2408[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
2409[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
2410[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
2411[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
2412[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
2413[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
2414[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
2415[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
2416[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
2417[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2418[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
2419[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
2420[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
2421[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
2422[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
2423[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
2424[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
2425[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
2426[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
2427[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
2428[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
2429[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
2430[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
2431[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
2432[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
2433[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
2434[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
2435[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2436[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2437[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
2438[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
2439[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2440[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
2441[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
2442[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
2443[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
2444[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2445[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
2446[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
2447[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2448[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2449[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
2450[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2451[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
2452[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
2453[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2454[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
2455[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
2456[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
2457[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2458[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
2459[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
2460[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2461[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
2462[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
2463[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
2464[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2465[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2466[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
2467[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
2468[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2469[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
2470[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2471[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
2472[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2473[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2474[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2475[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
2476[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
2477[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
2478[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
2479[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
2480[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
2481[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
2482[debug] c.j.b.PreparedStatementHandle - drop schema IF EXISTS public cascade
2483[debug] c.j.b.PreparedStatementHandle - create schema IF NOT EXISTS public
2484[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2485[debug] c.j.b.PreparedStatementHandle - CREATE EXTENSION IF NOT EXISTS unaccent WITH SCHEMA public
2486[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE SET search_path TO public, pg_temp AS $_$ SELECT unaccent('unaccent', $1) $_$
2487[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.f_unaccent(text) OWNER TO postgres
2488[debug] c.j.b.PreparedStatementHandle - CREATE FUNCTION json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) RETURNS json LANGUAGE sql IMMUTABLE STRICT AS $$ SELECT COALESCE( (SELECT ('{' || string_agg(to_json("key") || ':' || "value", ',') || '}') FROM json_each("json") WHERE "key" <> ALL ("keys_to_delete")), '{}' )::json $$
2489[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.json_object_delete_keys(json json, VARIADIC keys_to_delete text[]) OWNER TO postgres; CREATE FUNCTION set_updated_timestamp() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.updated_at := now(); RETURN NEW; END; $$
2490[debug] c.j.b.PreparedStatementHandle - ALTER FUNCTION public.set_updated_timestamp() OWNER TO postgres
2491[debug] c.j.b.PreparedStatementHandle - create table "site" ("site_id" bigserial NOT NULL PRIMARY KEY,"site_name" VARCHAR(254) NOT NULL,"logo" VARCHAR(254),"sidebar_image" VARCHAR(254),"logo_on_signup" BOOLEAN DEFAULT true NOT NULL)
2492[debug] c.j.b.PreparedStatementHandle - create table "profile" ("profile_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"user_name" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"password" VARCHAR(254) NOT NULL,"picture" VARCHAR(254),"push_notification" BOOLEAN DEFAULT false NOT NULL,"email_notification" BOOLEAN DEFAULT false NOT NULL,"active" BOOLEAN NOT NULL,"site_id" BIGINT DEFAULT 1 NOT NULL,"partner_code" VARCHAR(254),"permission" VARCHAR(254) DEFAULT 'user')
2493[debug] c.j.b.PreparedStatementHandle - create table "accepted_invite" ("profile_id" BIGINT NOT NULL PRIMARY KEY,"created_at" DATE NOT NULL)
2494[debug] c.j.b.PreparedStatementHandle - create table "alert" ("alert_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"title" VARCHAR(254) NOT NULL,"message" VARCHAR(254) NOT NULL,"payload" json NOT NULL,"profile_id" BIGINT NOT NULL,"alert_type" VARCHAR(254) NOT NULL,"unread" BOOLEAN DEFAULT true NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"expires_at" timestamptz)
2495[debug] c.j.b.PreparedStatementHandle - create index "idx_alert_unread" on "alert" ("unread")
2496[debug] c.j.b.PreparedStatementHandle - create index "idx_alerts-profile" on "alert" ("profile_id")
2497[debug] c.j.b.PreparedStatementHandle - create table "company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"promote" BOOLEAN DEFAULT false NOT NULL,"logo" VARCHAR(254) NOT NULL,"website" VARCHAR(254) NOT NULL,"stock" VARCHAR(254) NOT NULL,"excerpt" VARCHAR(254) NOT NULL,"news_feed" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT true NOT NULL)
2498[debug] c.j.b.PreparedStatementHandle - create index "idx_company_active" on "company" ("active")
2499[debug] c.j.b.PreparedStatementHandle - create index "idx_company_name" on "company" ("company_name")
2500[debug] c.j.b.PreparedStatementHandle - create table "contact" ("contact_id" bigserial NOT NULL PRIMARY KEY,"first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"current_company" json,"current_position" VARCHAR(254),"address" VARCHAR(254),"picture" VARCHAR(254),"phones" json NOT NULL,"email" json NOT NULL,"education" json NOT NULL,"social" json DEFAULT '[]' NOT NULL,"companies" json DEFAULT '[]' NOT NULL)
2501[debug] c.j.b.PreparedStatementHandle - create table "industry" ("industry_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL)
2502[debug] c.j.b.PreparedStatementHandle - create index "idx_industry_active" on "industry" ("active")
2503[debug] c.j.b.PreparedStatementHandle - create table "company_contact" ("contact_id" bigserial NOT NULL,"profile_company_id" BIGINT NOT NULL,"rel" VARCHAR(254) NOT NULL)
2504[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_contact_pk" primary key("contact_id","profile_company_id")
2505[debug] c.j.b.PreparedStatementHandle - create index "idx_company_contact_contact_id" on "company_contact" ("contact_id")
2506[debug] c.j.b.PreparedStatementHandle - create table "company_industry" ("company_id" BIGINT NOT NULL,"industry_id" INTEGER NOT NULL)
2507[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_industry_pk" primary key("industry_id","company_id")
2508[debug] c.j.b.PreparedStatementHandle - create table "profile_contact" ("profile_id" BIGINT NOT NULL,"contact_id" BIGINT NOT NULL)
2509[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "profile_contact_pk" primary key("profile_id","contact_id")
2510[debug] c.j.b.PreparedStatementHandle - create table "profile_company" ("profile_company_id" bigserial NOT NULL PRIMARY KEY,"profile_id" BIGINT NOT NULL,"company_id" BIGINT NOT NULL,"active" BOOLEAN DEFAULT false NOT NULL,"company_position" VARCHAR(254) DEFAULT '' NOT NULL)
2511[debug] c.j.b.PreparedStatementHandle - create index "idx_profile_company" on "profile_company" ("profile_id","company_id")
2512[debug] c.j.b.PreparedStatementHandle - create table "document" ("document_id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"document_type" VARCHAR(254) NOT NULL,"name" VARCHAR(254) NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"file_name" VARCHAR(254),"file_type" VARCHAR(254),"created_at" TIMESTAMP DEFAULT now() NOT NULL,"updated_at" TIMESTAMP DEFAULT now() NOT NULL,"meta" json DEFAULT '[]' NOT NULL,"is_email" BOOLEAN DEFAULT false NOT NULL,"is_template" BOOLEAN DEFAULT false NOT NULL)
2513[debug] c.j.b.PreparedStatementHandle - create table "todo" ("todo_id" bigserial NOT NULL PRIMARY KEY,"todo_type" VARCHAR(254) NOT NULL,"alerts" BOOLEAN NOT NULL,"contact_id" BIGINT,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"due_date" timestamptz NOT NULL,"created_on" timestamptz DEFAULT now() NOT NULL,"details" VARCHAR(254),"custom_type" VARCHAR(254),"completed" BOOLEAN DEFAULT false NOT NULL,"alert_interval" interval NOT NULL,"alerted" BOOLEAN DEFAULT false NOT NULL,"past_due" BOOLEAN DEFAULT false NOT NULL)
2514[debug] c.j.b.PreparedStatementHandle - create table "job" ("job_id" bigserial NOT NULL PRIMARY KEY,"location" VARCHAR(254),"due_date" date,"position" VARCHAR(254),"link" VARCHAR(254),"status" VARCHAR(254) NOT NULL,"company_name" VARCHAR(254),"profile_company_id" BIGINT,"contact_id" BIGINT)
2515[debug] c.j.b.PreparedStatementHandle - create index "idx_job_status" on "job" ("status")
2516[debug] c.j.b.PreparedStatementHandle - create table "job_board" ("board_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"link" VARCHAR(254) NOT NULL,"image" VARCHAR(254),"sort_order" INTEGER,"site_id" BIGINT)
2517[debug] c.j.b.PreparedStatementHandle - create table "job_todo" ("job_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2518[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "job_todo_pkey" primary key("job_id","todo_id")
2519[debug] c.j.b.PreparedStatementHandle - create table "mobile_device" ("profile_id" BIGINT NOT NULL,"platform" VARCHAR(254) NOT NULL,"token" VARCHAR(254) NOT NULL)
2520[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "mobile_device_pkey" primary key("profile_id","platform")
2521[debug] c.j.b.PreparedStatementHandle - create table "note" ("note_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"content" VARCHAR(254) NOT NULL,"tags" text ARRAY NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"updated_at" timestamptz)
2522[debug] c.j.b.PreparedStatementHandle - create table "partnership" ("partner_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"signup_text" VARCHAR(254) NOT NULL,"partner_code" VARCHAR(254) NOT NULL,"free_signup" BOOLEAN NOT NULL,"restrict_emails" text ARRAY DEFAULT '{}' NOT NULL,"disclaimer" VARCHAR(254),"confirm" BOOLEAN DEFAULT false NOT NULL)
2523[debug] c.j.b.PreparedStatementHandle - create table "pending_company" ("company_id" bigserial NOT NULL PRIMARY KEY,"company_name" VARCHAR(254) NOT NULL,"profile_id" BIGINT NOT NULL)
2524[debug] c.j.b.PreparedStatementHandle - create table "prep" ("profile_id" BIGINT NOT NULL,"prep_type" VARCHAR(254) NOT NULL,"content" VARCHAR(254))
2525[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "prep_pkey" primary key("profile_id","prep_type")
2526[debug] c.j.b.PreparedStatementHandle - create table "profile_category" ("profile_id" BIGINT NOT NULL,"category_id" INTEGER NOT NULL)
2527[debug] c.j.b.PreparedStatementHandle - create table "profile_document" ("profile_id" BIGINT NOT NULL,"document_id" UUID NOT NULL)
2528[debug] c.j.b.PreparedStatementHandle - create table "profile_job" ("profile_id" BIGINT NOT NULL,"job_id" BIGINT NOT NULL)
2529[debug] c.j.b.PreparedStatementHandle - create table "profile_note" ("profile_id" BIGINT NOT NULL,"note_id" UUID NOT NULL)
2530[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "pk_profile_note" primary key("profile_id","note_id")
2531[debug] c.j.b.PreparedStatementHandle - create table "profile_subscription" ("token_id" VARCHAR(254) NOT NULL,"subscription_id" VARCHAR(254) NOT NULL,"account_id" VARCHAR(254) NOT NULL,"created_at" timestamptz DEFAULT now() NOT NULL,"profile_id" BIGINT,"state" VARCHAR(254) NOT NULL,"active" BOOLEAN NOT NULL,"expires_at" timestamptz,"cancelled_on" timestamptz,"hear_about_us" VARCHAR(254))
2532[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "profile_subscription_pkey" primary key("token_id","subscription_id","account_id")
2533[debug] c.j.b.PreparedStatementHandle - create table "profile_tip_of_the_day" ("profile_id" BIGINT NOT NULL,"tip_order" INTEGER NOT NULL,"last_updated" DATE NOT NULL)
2534[debug] c.j.b.PreparedStatementHandle - alter table "profile_tip_of_the_day" add constraint "pk_profile_tip_of_the_day" primary key("profile_id","tip_order")
2535[debug] c.j.b.PreparedStatementHandle - create table "tip_of_the_day" ("tip_id" bigserial NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2536[debug] c.j.b.PreparedStatementHandle - create table "profile_todo" ("profile_id" BIGINT NOT NULL,"todo_id" BIGINT NOT NULL)
2537[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "pk_profile_todo" primary key("profile_id","todo_id")
2538[debug] c.j.b.PreparedStatementHandle - create table "question_industry" ("industry_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL)
2539[debug] c.j.b.PreparedStatementHandle - create table "question" ("question_id" UUID DEFAULT uuid_generate_v4() NOT NULL,"profile_id" BIGINT NOT NULL,"question" VARCHAR(254) NOT NULL,"answer" VARCHAR(254) DEFAULT '' NOT NULL,"industry_id" UUID NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2540[debug] c.j.b.PreparedStatementHandle - alter table "question" add constraint "pk_question" primary key("question_id","profile_id")
2541[debug] c.j.b.PreparedStatementHandle - create table "recruiter" ("recruiter_id" serial NOT NULL PRIMARY KEY,"name" VARCHAR(254) NOT NULL,"industry_id" INTEGER NOT NULL,"url" VARCHAR(254) NOT NULL,"sort_order" INTEGER NOT NULL)
2542[debug] c.j.b.PreparedStatementHandle - create table "scribble_pad" ("profile_id" BIGINT NOT NULL,"entries" json DEFAULT '[]' NOT NULL)
2543[debug] c.j.b.PreparedStatementHandle - create table "site_document" ("template_id" UUID DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY,"site_id" BIGINT NOT NULL,"name" VARCHAR(254) NOT NULL,"description" VARCHAR(254),"document_type" VARCHAR(254) NOT NULL,"file_name" VARCHAR(254) NOT NULL,"file_type" VARCHAR(254))
2544[debug] c.j.b.PreparedStatementHandle - create table "site_question" ("question_id" bigserial NOT NULL PRIMARY KEY,"industry_id" UUID NOT NULL,"question" VARCHAR(254) NOT NULL,"sort_order" INTEGER DEFAULT 0 NOT NULL)
2545[debug] c.j.b.PreparedStatementHandle - create table "token" ("first_name" VARCHAR(254) NOT NULL,"last_name" VARCHAR(254) NOT NULL,"uuid" VARCHAR(254) NOT NULL,"email" VARCHAR(254) NOT NULL,"created_at" timestamptz NOT NULL,"expires_on" timestamptz NOT NULL,"signup" BOOLEAN NOT NULL,"site_id" BIGINT NOT NULL)
2546[debug] c.j.b.PreparedStatementHandle - create table "user_category" ("category_id" SERIAL NOT NULL PRIMARY KEY,"category_name" VARCHAR(254) NOT NULL)
2547[debug] c.j.b.PreparedStatementHandle - create table "welcome_message" ("message_id" BIGSERIAL NOT NULL PRIMARY KEY,"text" VARCHAR(254) NOT NULL,"sort_order" INTEGER)
2548[debug] c.j.b.PreparedStatementHandle - alter table "alert" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2549[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete CASCADE
2550[debug] c.j.b.PreparedStatementHandle - alter table "company_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2551[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "company_fk" foreign key("company_id") references "company"("company_id") on update CASCADE on delete CASCADE
2552[debug] c.j.b.PreparedStatementHandle - alter table "company_industry" add constraint "industry_fk" foreign key("industry_id") references "industry"("industry_id") on update CASCADE on delete CASCADE
2553[debug] c.j.b.PreparedStatementHandle - alter table "profile_contact" add constraint "contact_fk" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete CASCADE
2554[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_compan" foreign key("company_id") references "company"("company_id") on update NO ACTION on delete NO ACTION
2555[debug] c.j.b.PreparedStatementHandle - alter table "profile_company" add constraint "fk_profile_companies_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete NO ACTION
2556[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "document_contact_id_fkey" foreign key("contact_id") references "contact"("contact_id") on update CASCADE on delete SET NULL
2557[debug] c.j.b.PreparedStatementHandle - alter table "document" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2558[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_contact_id" foreign key("contact_id") references "contact"("contact_id") on update NO ACTION on delete CASCADE
2559[debug] c.j.b.PreparedStatementHandle - alter table "todo" add constraint "fk_todo_profile_company_id" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update NO ACTION on delete CASCADE
2560[debug] c.j.b.PreparedStatementHandle - alter table "job" add constraint "profile_company_fk" foreign key("profile_company_id") references "profile_company"("profile_company_id") on update CASCADE on delete SET NULL
2561[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_job" foreign key("job_id") references "job"("job_id") on update RESTRICT on delete CASCADE
2562[debug] c.j.b.PreparedStatementHandle - alter table "job_todo" add constraint "fk_job_todo_todo" foreign key("todo_id") references "todo"("todo_id") on update RESTRICT on delete CASCADE
2563[debug] c.j.b.PreparedStatementHandle - alter table "mobile_device" add constraint "fk_mobile_profile" foreign key("profile_id") references "profile"("profile_id") on update RESTRICT on delete CASCADE
2564[debug] c.j.b.PreparedStatementHandle - alter table "pending_company" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2565[debug] c.j.b.PreparedStatementHandle - alter table "prep" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete CASCADE
2566[debug] c.j.b.PreparedStatementHandle - alter table "profile_category" add constraint "profile_category_category_id" foreign key("category_id") references "user_category"("category_id") on update NO ACTION on delete CASCADE
2567[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "document_fk" foreign key("document_id") references "document"("document_id") on update CASCADE on delete CASCADE
2568[debug] c.j.b.PreparedStatementHandle - alter table "profile_document" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2569[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "job_fk" foreign key("job_id") references "job"("job_id") on update CASCADE on delete CASCADE
2570[debug] c.j.b.PreparedStatementHandle - alter table "profile_job" add constraint "profile_fk" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2571[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_note_id" foreign key("note_id") references "note"("note_id") on update NO ACTION on delete CASCADE
2572[debug] c.j.b.PreparedStatementHandle - alter table "profile_note" add constraint "fk_profile_note_profile_id" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2573[debug] c.j.b.PreparedStatementHandle - alter table "profile_subscription" add constraint "fk_subscription_profile" foreign key("profile_id") references "profile"("profile_id") on update NO ACTION on delete CASCADE
2574[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_profile_id" foreign key("profile_id") references "profile"("profile_id") on update CASCADE on delete SET NULL
2575[debug] c.j.b.PreparedStatementHandle - alter table "profile_todo" add constraint "fk_profile_todo_todo_id" foreign key("todo_id") references "todo"("todo_id") on update CASCADE on delete CASCADE
2576[debug] c.j.b.PreparedStatementHandle - alter table "recruiter" add constraint "fk_recruiter_industry_id" foreign key("industry_id") references "industry"("industry_id") on update NO ACTION on delete CASCADE
2577[debug] c.j.b.PreparedStatementHandle - alter table "site_document" add constraint "fk_site_document_site_id" foreign key("site_id") references "site"("site_id") on update NO ACTION on delete CASCADE
2578[debug] c.j.b.PreparedStatementHandle - alter table "site_question" add constraint "fk_site_question_industry_id" foreign key("industry_id") references "question_industry"("industry_id") on update NO ACTION on delete CASCADE
2579[debug] c.j.b.PreparedStatementHandle - insert into "site" ("site_name","logo","sidebar_image","logo_on_signup") values ('default','[SQL NULL of type 12]','[SQL NULL of type 12]',false)
2580[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('admin','zqn5xy52','4kicmik1','hg3ms9lq@yahoo.com','f3aiuq0y',false,false,true,1,'a','admin')
2581[debug] c.j.b.PreparedStatementHandle - insert into "profile" ("first_name","last_name","user_name","email","password","push_notification","email_notification","active","site_id","partner_code","permission") values ('user','m194r60u','11kkiyjm','2dlvtsza@yahoo.com','jowc8cl1',false,false,true,1,'a','user')
2582[info] ProfilesSpec
2583[info]
2584[info] Profiles#sites should
2585[info] ! be routed at /api/sites
2586[error] PSQLException: : ERROR: relation "site" already exists (QueryExecutorImpl.java:2198)
2587[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
2588[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
2589[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
2590[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
2591[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
2592[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
2593[error] com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:140)
2594[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:267)
2595[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
2596[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
2597[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
2598[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
2599[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
2600[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
2601[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2602[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2603[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
2604[error] play.api.test.Helpers$.running(Helpers.scala:403)
2605[error] play.api.test.WithApplication.around(Specs.scala:23)
2606[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
2607[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
2608[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
2609[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
2610[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$5$$anon$3.<init>(ProfilesSpec.scala:34)
2611[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$5.apply(ProfilesSpec.scala:34)
2612[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$5.apply(ProfilesSpec.scala:34)
2613[info]
2614[info] ! be routed at /api/invites/sites
2615[error] PSQLException: : ERROR: relation "site" does not exist
2616[error] Position: 13 (QueryExecutorImpl.java:2198)
2617[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
2618[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
2619[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
2620[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
2621[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
2622[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
2623[error] com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)
2624[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:269)
2625[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
2626[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
2627[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
2628[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
2629[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
2630[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
2631[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2632[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2633[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
2634[error] play.api.test.Helpers$.running(Helpers.scala:403)
2635[error] play.api.test.WithApplication.around(Specs.scala:23)
2636[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
2637[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
2638[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
2639[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
2640[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$6$$anon$4.<init>(ProfilesSpec.scala:38)
2641[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$6.apply(ProfilesSpec.scala:38)
2642[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$6.apply(ProfilesSpec.scala:38)
2643[info]
2644[info] ! be routed at /api/users/sites
2645[error] PSQLException: : ERROR: relation "profile" does not exist
2646[error] Position: 13 (QueryExecutorImpl.java:2198)
2647[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
2648[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
2649[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
2650[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
2651[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
2652[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
2653[error] com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)
2654[error] models.Profiles$$anon$2.insert(Profile.scala:374)
2655[error] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2656[error] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
2657[error] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2658[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:274)
2659[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
2660[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
2661[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
2662[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
2663[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
2664[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
2665[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2666[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2667[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
2668[error] play.api.test.Helpers$.running(Helpers.scala:403)
2669[error] play.api.test.WithApplication.around(Specs.scala:23)
2670[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
2671[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
2672[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
2673[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
2674[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$7$$anon$5.<init>(ProfilesSpec.scala:42)
2675[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$7.apply(ProfilesSpec.scala:42)
2676[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$7.apply(ProfilesSpec.scala:42)
2677[info]
2678[info] ! return a collection of sites
2679[error] PSQLException: : ERROR: relation "site" does not exist
2680[error] Position: 13 (QueryExecutorImpl.java:2198)
2681[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
2682[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
2683[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
2684[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
2685[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
2686[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
2687[error] com.jolbox.bonecp.PreparedStatementHandle.executeUpdate(PreparedStatementHandle.java:205)
2688[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:269)
2689[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
2690[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
2691[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
2692[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
2693[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
2694[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
2695[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2696[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2697[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
2698[error] play.api.test.Helpers$.running(Helpers.scala:403)
2699[error] play.api.test.WithApplication.around(Specs.scala:23)
2700[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
2701[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
2702[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
2703[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
2704[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$8$$anon$6.<init>(ProfilesSpec.scala:46)
2705[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$8.apply(ProfilesSpec.scala:46)
2706[error] controllers.admin.ProfilesSpec$$anonfun$21$$anonfun$apply$8.apply(ProfilesSpec.scala:46)
2707[info]
2708[info]
2709[info] Profiles#deleteInvite should
2710[info] ! be routed at DELETE /api/invites/:id
2711[error] PSQLException: : ERROR: duplicate key value violates unique constraint "pg_extension_name_index"
2712[error] Detail: Key (extname)=(unaccent) already exists. (QueryExecutorImpl.java:2198)
2713[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
2714[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
2715[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
2716[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
2717[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
2718[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
2719[error] com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:140)
2720[error] test.PlaySpec$WithDefault$$anonfun$before$1$$anonfun$apply$1.apply(PlaySpec.scala:258)
2721[error] test.PlaySpec$WithDefault$$anonfun$before$1$$anonfun$apply$1.apply(PlaySpec.scala:258)
2722[error] test.ScriptRunner$$anonfun$apply$5.apply(ScriptRunner.scala:44)
2723[error] test.ScriptRunner$$anonfun$apply$5.apply(ScriptRunner.scala:28)
2724[error] test.ScriptRunner.apply(ScriptRunner.scala:28)
2725[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:257)
2726[error] test.PlaySpec$WithDefault$$anonfun$before$1.apply(PlaySpec.scala:255)
2727[error] test.PlaySpec$WithDefault.withSession(PlaySpec.scala:231)
2728[error] test.PlaySpec$WithDefault.before(PlaySpec.scala:254)
2729[error] test.PlaySpec$WithUser.before(PlaySpec.scala:180)
2730[error] test.PlaySpec$WithUser.before(PlaySpec.scala:176)
2731[error] test.BeforeWithinAround$$anonfun$around$1.apply(PlaySpec.scala:296)
2732[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2733[error] play.api.test.WithApplication$$anonfun$around$1.apply(Specs.scala:23)
2734[error] play.api.test.PlayRunners$class.running(Helpers.scala:49)
2735[error] play.api.test.Helpers$.running(Helpers.scala:403)
2736[error] play.api.test.WithApplication.around(Specs.scala:23)
2737[error] test.PlaySpec$WithDefault.test$BeforeWithinAround$$super$around(PlaySpec.scala:226)
2738[error] test.BeforeWithinAround$class.around(PlaySpec.scala:295)
2739[error] test.PlaySpec$WithDefault.around(PlaySpec.scala:226)
2740[error] play.api.test.WithApplication.delayedInit(Specs.scala:20)
2741[error] controllers.admin.ProfilesSpec$$anonfun$28$$anonfun$apply$10$$anon$7.<init>(ProfilesSpec.scala:57)
2742[error] controllers.admin.ProfilesSpec$$anonfun$28$$anonfun$apply$10.apply(ProfilesSpec.scala:57)
2743[error] controllers.admin.ProfilesSpec$$anonfun$28$$anonfun$apply$10.apply(ProfilesSpec.scala:57)
2744[info]
2745[info] + return OK when invite is deleted
2746[info] + return NotFound when there is no invite to delete
2747[info]
2748[info] Profiles#invite should
2749[info] + be routed at GET /api/invites
2750[info] + only return pending invites by default
2751[info] + only return accepted invites when ?accepted=true
2752[info]
2753[info] Profile#makeAdmin should
2754[info] + be routed to PUT /api/users/:id/admin
2755[info] + change user permission to admin
2756[info]
2757[info] Profile#removeAdmin should
2758[info] + be routed to DELETE /api/users/:id/admin
2759[info] + alert user that 1 admin is needed at all times
2760[info] + allow changing admin permission to 'user' if there is more then 1 admin
2761[info]
2762[info] Profile#index should
2763[info] + be routed to /api/users
2764[info] ! default sorting by firstName asc
2765[error] PSQLException: : ERROR: column x71.created_at does not exist
2766[error] Position: 856 (QueryExecutorImpl.java:2198)
2767[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
2768[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
2769[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
2770[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
2771[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
2772[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
2773[error] com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:140)
2774[error] controllers.admin.Profiles$$anonfun$index$1.apply(Profiles.scala:250)
2775[error] controllers.admin.Profiles$$anonfun$index$1.apply(Profiles.scala:211)
2776[error] play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:433)
2777[error] play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:432)
2778[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1.core$SecureController$SecuredDBActionBuilder$$anonfun$$anonfun$$work$1(SecureController.scala:87)
2779[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1$$anonfun$apply$3.apply(SecureController.scala:90)
2780[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1$$anonfun$apply$3.apply(SecureController.scala:90)
2781[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1.apply(SecureController.scala:90)
2782[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1.apply(SecureController.scala:84)
2783[info]
2784[info] ! sort by firstName desc
2785[error] PSQLException: : ERROR: column x71.created_at does not exist
2786[error] Position: 856 (QueryExecutorImpl.java:2198)
2787[error] org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
2788[error] org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
2789[error] org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
2790[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
2791[error] org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
2792[error] org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
2793[error] com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:140)
2794[error] controllers.admin.Profiles$$anonfun$index$1.apply(Profiles.scala:250)
2795[error] controllers.admin.Profiles$$anonfun$index$1.apply(Profiles.scala:211)
2796[error] play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:433)
2797[error] play.api.mvc.ActionBuilder$$anonfun$apply$16.apply(Action.scala:432)
2798[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1.core$SecureController$SecuredDBActionBuilder$$anonfun$$anonfun$$work$1(SecureController.scala:87)
2799[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1$$anonfun$apply$3.apply(SecureController.scala:90)
2800[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1$$anonfun$apply$3.apply(SecureController.scala:90)
2801[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1.apply(SecureController.scala:90)
2802[error] core.SecureController$SecuredDBActionBuilder$$anonfun$invokeSecuredBlock$1$$anonfun$apply$1.apply(SecureController.scala:84)
2803[info]
2804[info]
2805[info] methods should
2806[info] + encode invite correctly
2807[info] + encode accepted invite correctly
2808[info]
2809[info] Total for specification ProfilesSpec
2810[info] Finished in 51 seconds, 810 ms
2811[info] 20 examples, 0 failure, 7 errors
2812[error] Error: Total 20, Failed 0, Errors 7, Passed 13
2813[error] Error during tests:
2814[error] controllers.admin.ProfilesSpec
2815[error] (jobtreks-admin/test:testOnly) sbt.TestsFailedException: Tests unsuccessful
2816[error] (jobtreks-api/test:testOnly) sbt.TestsFailedException: Tests unsuccessful
2817[error] Total time: 69 s, completed Sep 24, 2015 3:22:12 PM
2818FAAMBP:Jobtreks-Web faalbue$