From db9e5ac430deeb09c6b4c9ad702dadd46c5af753 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Fri, 10 Mar 2017 18:55:39 -0800 Subject: [PATCH 1/5] [PASSWORD RESET]: wip --- .../password_reset_controller_test.exs | 21 +++++++++++++++++++ web/controllers/password_reset_controller.ex | 18 ++++++++++++++++ web/router.ex | 1 + web/views/password_reset_view.ex | 10 +++++++++ 4 files changed, 50 insertions(+) create mode 100644 test/controllers/password_reset_controller_test.exs create mode 100644 web/controllers/password_reset_controller.ex create mode 100644 web/views/password_reset_view.ex diff --git a/test/controllers/password_reset_controller_test.exs b/test/controllers/password_reset_controller_test.exs new file mode 100644 index 000000000..e82b82ecc --- /dev/null +++ b/test/controllers/password_reset_controller_test.exs @@ -0,0 +1,21 @@ +defmodule CodeCorps.PasswordResetControllerTest do + @moduledoc false + + use CodeCorps.ApiCase, resource_name: :password_reset + alias CodeCorps.AuthToken + + @tag :authenticated + test "creates and renders resource when data is valid", %{conn: conn, current_user: current_user} do + {:ok, auth_token} = AuthToken.changeset(%AuthToken{}, current_user) |> Repo.insert + attrs = %{"value" => auth_token.value, "password" => "123456", "password_confirmation" => "123456"} + conn = post conn, password_reset_path(conn, :reset_password), attrs + response = json_response(conn, 201) + assert response + end + + # test "does not create resource and renders errors when data is invalid", %{conn: conn} do + # conn = post conn, password_reset_path(conn, :create), password_reset: @invalid_attrs + # assert json_response(conn, 422)["errors"] != %{} + # end + +end diff --git a/web/controllers/password_reset_controller.ex b/web/controllers/password_reset_controller.ex new file mode 100644 index 000000000..6f68f5968 --- /dev/null +++ b/web/controllers/password_reset_controller.ex @@ -0,0 +1,18 @@ +defmodule CodeCorps.PasswordResetController do + use CodeCorps.Web, :controller + + alias CodeCorps.User + + def reset_password(conn, %{"value" => value, "password" => password, "password_confirmation" => password_confirmation}) do + token = Repo.get_by(CodeCorps.AuthToken, value: value).value + case Phoenix.Token.verify(CodeCorps.Endpoint, "user", token, max_age: 1209600) do + {:ok, _} -> + User.reset_password_changeset(conn.assigns.current_user, %{password: password, password_confirmation: password_confirmation}) + conn + |> put_status(:created) + |> render("show.json", token: token) + {:error, _} -> + {:error, conn} + end + end +end diff --git a/web/router.ex b/web/router.ex index 6ac8bbda2..1dba11429 100644 --- a/web/router.ex +++ b/web/router.ex @@ -64,6 +64,7 @@ defmodule CodeCorps.Router do resources "/comments", CommentController, only: [:create, :update] resources "/donation-goals", DonationGoalController, only: [:create, :update, :delete] resources "/organizations", OrganizationController, only: [:create, :update] + post "/password/reset", PasswordResetController, :reset_password resources "/previews", PreviewController, only: [:create] resources "/projects", ProjectController, only: [:create, :update] resources "/project-categories", ProjectCategoryController, only: [:create, :delete] diff --git a/web/views/password_reset_view.ex b/web/views/password_reset_view.ex new file mode 100644 index 000000000..e320587de --- /dev/null +++ b/web/views/password_reset_view.ex @@ -0,0 +1,10 @@ +defmodule CodeCorps.PasswordResetView do + use CodeCorps.Web, :view + + def render("show.json", %{token: token}) do + %{ + token: token + } + end + +end From 59aff2daa1ffb7c88c4fbd1cd0cd3236a3d74062 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Mon, 13 Mar 2017 20:56:52 -0700 Subject: [PATCH 2/5] [RESETPWD]: refactor controller to check AuthToken model and verify, returning 422 otherwise --- .../password_reset_controller_test.exs | 21 +++++++--- web/controllers/password_reset_controller.ex | 41 ++++++++++++++----- web/views/password_reset_view.ex | 4 +- 3 files changed, 48 insertions(+), 18 deletions(-) diff --git a/test/controllers/password_reset_controller_test.exs b/test/controllers/password_reset_controller_test.exs index e82b82ecc..dbdfe13fa 100644 --- a/test/controllers/password_reset_controller_test.exs +++ b/test/controllers/password_reset_controller_test.exs @@ -7,15 +7,26 @@ defmodule CodeCorps.PasswordResetControllerTest do @tag :authenticated test "creates and renders resource when data is valid", %{conn: conn, current_user: current_user} do {:ok, auth_token} = AuthToken.changeset(%AuthToken{}, current_user) |> Repo.insert - attrs = %{"value" => auth_token.value, "password" => "123456", "password_confirmation" => "123456"} + attrs = %{"token" => auth_token.value, "password" => "123456", "password_confirmation" => "123456"} conn = post conn, password_reset_path(conn, :reset_password), attrs response = json_response(conn, 201) assert response end - # test "does not create resource and renders errors when data is invalid", %{conn: conn} do - # conn = post conn, password_reset_path(conn, :create), password_reset: @invalid_attrs - # assert json_response(conn, 422)["errors"] != %{} - # end + @tag :authenticated + test "does not create resource and renders errors when password does not match", %{conn: conn, current_user: current_user} do + {:ok, auth_token} = AuthToken.changeset(%AuthToken{}, current_user) |> Repo.insert + attrs = %{"token" => auth_token.value, "password" => "123456", "password_confirmation" => "another"} + conn = post conn, password_reset_path(conn, :reset_password), attrs + assert json_response(conn, 422) + end + + @tag :authenticated + test "does not create resource and renders errors when token is invalid", %{conn: conn, current_user: current_user} do + {:ok, _} = AuthToken.changeset(%AuthToken{}, current_user) |> Repo.insert + attrs = %{"token" => "random token", "password" => "123456", "password_confirmation" => "123456"} + conn = post conn, password_reset_path(conn, :reset_password), attrs + assert json_response(conn, 422) + end end diff --git a/web/controllers/password_reset_controller.ex b/web/controllers/password_reset_controller.ex index 6f68f5968..d81e71f9b 100644 --- a/web/controllers/password_reset_controller.ex +++ b/web/controllers/password_reset_controller.ex @@ -1,18 +1,37 @@ defmodule CodeCorps.PasswordResetController do use CodeCorps.Web, :controller - alias CodeCorps.User + alias CodeCorps.{User,AuthToken} + alias Ecto.Changeset - def reset_password(conn, %{"value" => value, "password" => password, "password_confirmation" => password_confirmation}) do - token = Repo.get_by(CodeCorps.AuthToken, value: value).value - case Phoenix.Token.verify(CodeCorps.Endpoint, "user", token, max_age: 1209600) do - {:ok, _} -> - User.reset_password_changeset(conn.assigns.current_user, %{password: password, password_confirmation: password_confirmation}) - conn - |> put_status(:created) - |> render("show.json", token: token) - {:error, _} -> - {:error, conn} + @doc""" + reset_password should take a token, password, and password_confirmation and check + 1. the token exists in AuthToken model & verifies it with Phoenix.Token.verify + 2. password & password_confirmation match + and return email. 422 if pwd do not match or auth token does not exist + """ + def reset_password(conn, %{"token" => token, "password" => password, "password_confirmation" => password_confirmation}) do + with %AuthToken{value: auth_token} <- Repo.get_by(CodeCorps.AuthToken, value: token), + {:ok, _} <- Phoenix.Token.verify(CodeCorps.Endpoint, "user", auth_token, max_age: 1209600) do + with %Changeset{valid?: true} <- User.reset_password_changeset(conn.assigns.current_user, + %{password: password, password_confirmation: password_confirmation}) do + conn + |> put_status(:created) + |> render("show.json", email: conn.assigns.current_user.email) + else + %Changeset{valid?: false} -> + handle_reset_pswd_result(conn) + end + else + nil -> + handle_reset_pswd_result(conn) end end + + defp handle_reset_pswd_result(conn) do + conn + |> put_status(422) + |> render(CodeCorps.ErrorView, "422.json-api") + end + end diff --git a/web/views/password_reset_view.ex b/web/views/password_reset_view.ex index e320587de..c61d7dc7d 100644 --- a/web/views/password_reset_view.ex +++ b/web/views/password_reset_view.ex @@ -1,9 +1,9 @@ defmodule CodeCorps.PasswordResetView do use CodeCorps.Web, :view - def render("show.json", %{token: token}) do + def render("show.json", %{email: email}) do %{ - token: token + email: email } end From 6715627097bfaa3d5b7c997ba9d16d7e7337bc97 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Mon, 13 Mar 2017 21:00:30 -0700 Subject: [PATCH 3/5] [VIEW]: pswd reset view test --- test/views/password_reset_view_test.exs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/views/password_reset_view_test.exs diff --git a/test/views/password_reset_view_test.exs b/test/views/password_reset_view_test.exs new file mode 100644 index 000000000..2388ff48b --- /dev/null +++ b/test/views/password_reset_view_test.exs @@ -0,0 +1,16 @@ +defmodule CodeCorps.PasswordResetViewTest do + use CodeCorps.ViewCase + + test "renders show" do + email = "wat@codecorps.org" + + rendered_json = render(CodeCorps.PasswordResetView, "show.json", %{email: email}) + + expected_json = %{ + email: email + } + + assert expected_json == rendered_json + end + +end From 37217d21684eec418170dd93c8f505f36bf7db16 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Wed, 15 Mar 2017 11:50:18 -0700 Subject: [PATCH 4/5] check user as well when resetting pswd --- web/controllers/password_reset_controller.ex | 7 ++++--- web/models/auth_token.ex | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/web/controllers/password_reset_controller.ex b/web/controllers/password_reset_controller.ex index d81e71f9b..14f3e5704 100644 --- a/web/controllers/password_reset_controller.ex +++ b/web/controllers/password_reset_controller.ex @@ -11,13 +11,14 @@ defmodule CodeCorps.PasswordResetController do and return email. 422 if pwd do not match or auth token does not exist """ def reset_password(conn, %{"token" => token, "password" => password, "password_confirmation" => password_confirmation}) do - with %AuthToken{value: auth_token} <- Repo.get_by(CodeCorps.AuthToken, value: token), + user = conn.assigns.current_user + with %AuthToken{value: auth_token} <- Repo.get_by(CodeCorps.AuthToken, %{ value: token, user_id: user.id }), {:ok, _} <- Phoenix.Token.verify(CodeCorps.Endpoint, "user", auth_token, max_age: 1209600) do - with %Changeset{valid?: true} <- User.reset_password_changeset(conn.assigns.current_user, + with %Changeset{valid?: true} <- User.reset_password_changeset(user, %{password: password, password_confirmation: password_confirmation}) do conn |> put_status(:created) - |> render("show.json", email: conn.assigns.current_user.email) + |> render("show.json", email: user.email) else %Changeset{valid?: false} -> handle_reset_pswd_result(conn) diff --git a/web/models/auth_token.ex b/web/models/auth_token.ex index 2b7874e87..a3661f449 100644 --- a/web/models/auth_token.ex +++ b/web/models/auth_token.ex @@ -25,7 +25,8 @@ defmodule CodeCorps.AuthToken do def changeset(struct, user) do token = CodeCorps.Endpoint |> Phoenix.Token.sign("user", user.id) struct - |> cast(%{ value: token }, [:value]) - |> validate_required([:value]) + |> cast(%{ value: token, user_id: user.id }, [:value, :user_id]) + |> validate_required([:value, :user_id]) + |> assoc_constraint(:user) end end From 78eb2c7ee2893591ca1a72f23f8293ebd45dc9c8 Mon Sep 17 00:00:00 2001 From: snewcomer Date: Wed, 15 Mar 2017 11:57:59 -0700 Subject: [PATCH 5/5] add structure.sql --- priv/repo/structure.sql | 239 ++++++++++++++++++++-------------------- 1 file changed, 120 insertions(+), 119 deletions(-) diff --git a/priv/repo/structure.sql b/priv/repo/structure.sql index 820dc1af4..47b59a459 100644 --- a/priv/repo/structure.sql +++ b/priv/repo/structure.sql @@ -2,11 +2,12 @@ -- PostgreSQL database dump -- --- Dumped from database version 9.5.1 --- Dumped by pg_dump version 9.5.1 +-- Dumped from database version 9.6.1 +-- Dumped by pg_dump version 9.6.1 SET statement_timeout = 0; SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; @@ -1375,252 +1376,252 @@ ALTER SEQUENCE users_id_seq OWNED BY users.id; -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: auth_token id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY auth_token ALTER COLUMN id SET DEFAULT nextval('auth_token_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: categories id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY categories ALTER COLUMN id SET DEFAULT nextval('categories_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: comments id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: donation_goals id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY donation_goals ALTER COLUMN id SET DEFAULT nextval('donation_goals_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: organization_memberships id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY organization_memberships ALTER COLUMN id SET DEFAULT nextval('organization_memberships_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: organizations id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY organizations ALTER COLUMN id SET DEFAULT nextval('organizations_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: previews id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY previews ALTER COLUMN id SET DEFAULT nextval('previews_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: project_categories id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY project_categories ALTER COLUMN id SET DEFAULT nextval('project_categories_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: project_skills id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY project_skills ALTER COLUMN id SET DEFAULT nextval('project_skills_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: project_users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY project_users ALTER COLUMN id SET DEFAULT nextval('project_users_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: projects id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY projects ALTER COLUMN id SET DEFAULT nextval('projects_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: role_skills id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY role_skills ALTER COLUMN id SET DEFAULT nextval('role_skills_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: roles id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY roles ALTER COLUMN id SET DEFAULT nextval('roles_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: skills id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY skills ALTER COLUMN id SET DEFAULT nextval('skills_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: slugged_routes id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY slugged_routes ALTER COLUMN id SET DEFAULT nextval('slugged_routes_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_connect_accounts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_accounts ALTER COLUMN id SET DEFAULT nextval('stripe_connect_accounts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_connect_cards id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_cards ALTER COLUMN id SET DEFAULT nextval('stripe_connect_cards_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_connect_charges id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_charges ALTER COLUMN id SET DEFAULT nextval('stripe_connect_charges_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_connect_customers id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_customers ALTER COLUMN id SET DEFAULT nextval('stripe_connect_customers_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_connect_plans id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_plans ALTER COLUMN id SET DEFAULT nextval('stripe_connect_plans_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_connect_subscriptions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_subscriptions ALTER COLUMN id SET DEFAULT nextval('stripe_connect_subscriptions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_events id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_events ALTER COLUMN id SET DEFAULT nextval('stripe_events_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_external_accounts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_external_accounts ALTER COLUMN id SET DEFAULT nextval('stripe_external_accounts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_file_upload id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_file_upload ALTER COLUMN id SET DEFAULT nextval('stripe_file_upload_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_invoices id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_invoices ALTER COLUMN id SET DEFAULT nextval('stripe_invoices_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_platform_cards id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_platform_cards ALTER COLUMN id SET DEFAULT nextval('stripe_platform_cards_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_platform_customers id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_platform_customers ALTER COLUMN id SET DEFAULT nextval('stripe_platform_customers_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: task_lists id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY task_lists ALTER COLUMN id SET DEFAULT nextval('task_lists_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: task_skills id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY task_skills ALTER COLUMN id SET DEFAULT nextval('task_skills_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: tasks id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY tasks ALTER COLUMN id SET DEFAULT nextval('tasks_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: user_categories id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY user_categories ALTER COLUMN id SET DEFAULT nextval('user_categories_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: user_roles id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY user_roles ALTER COLUMN id SET DEFAULT nextval('user_roles_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: user_skills id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY user_skills ALTER COLUMN id SET DEFAULT nextval('user_skills_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: user_tasks id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY user_tasks ALTER COLUMN id SET DEFAULT nextval('user_tasks_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass); -- --- Name: auth_token_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: auth_token auth_token_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY auth_token @@ -1628,7 +1629,7 @@ ALTER TABLE ONLY auth_token -- --- Name: categories_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: categories categories_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY categories @@ -1636,7 +1637,7 @@ ALTER TABLE ONLY categories -- --- Name: comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: comments comments_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY comments @@ -1644,7 +1645,7 @@ ALTER TABLE ONLY comments -- --- Name: donation_goals_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: donation_goals donation_goals_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY donation_goals @@ -1652,7 +1653,7 @@ ALTER TABLE ONLY donation_goals -- --- Name: organization_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: organization_memberships organization_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY organization_memberships @@ -1660,7 +1661,7 @@ ALTER TABLE ONLY organization_memberships -- --- Name: organizations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: organizations organizations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY organizations @@ -1668,7 +1669,7 @@ ALTER TABLE ONLY organizations -- --- Name: previews_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: previews previews_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY previews @@ -1676,7 +1677,7 @@ ALTER TABLE ONLY previews -- --- Name: project_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: project_categories project_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_categories @@ -1684,7 +1685,7 @@ ALTER TABLE ONLY project_categories -- --- Name: project_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: project_skills project_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_skills @@ -1692,7 +1693,7 @@ ALTER TABLE ONLY project_skills -- --- Name: project_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: project_users project_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_users @@ -1700,7 +1701,7 @@ ALTER TABLE ONLY project_users -- --- Name: projects_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: projects projects_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY projects @@ -1708,7 +1709,7 @@ ALTER TABLE ONLY projects -- --- Name: role_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: role_skills role_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY role_skills @@ -1716,7 +1717,7 @@ ALTER TABLE ONLY role_skills -- --- Name: roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY roles @@ -1724,7 +1725,7 @@ ALTER TABLE ONLY roles -- --- Name: schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY schema_migrations @@ -1732,7 +1733,7 @@ ALTER TABLE ONLY schema_migrations -- --- Name: skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: skills skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY skills @@ -1740,7 +1741,7 @@ ALTER TABLE ONLY skills -- --- Name: slugged_routes_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: slugged_routes slugged_routes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY slugged_routes @@ -1748,7 +1749,7 @@ ALTER TABLE ONLY slugged_routes -- --- Name: stripe_connect_cards_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_cards stripe_connect_cards_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_cards @@ -1756,7 +1757,7 @@ ALTER TABLE ONLY stripe_connect_cards -- --- Name: stripe_connect_charges_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_charges stripe_connect_charges_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_charges @@ -1764,7 +1765,7 @@ ALTER TABLE ONLY stripe_connect_charges -- --- Name: stripe_connect_customers_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_customers stripe_connect_customers_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_customers @@ -1772,7 +1773,7 @@ ALTER TABLE ONLY stripe_connect_customers -- --- Name: stripe_events_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_events stripe_events_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_events @@ -1780,7 +1781,7 @@ ALTER TABLE ONLY stripe_events -- --- Name: stripe_external_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_external_accounts stripe_external_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_external_accounts @@ -1788,7 +1789,7 @@ ALTER TABLE ONLY stripe_external_accounts -- --- Name: stripe_file_upload_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_file_upload stripe_file_upload_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_file_upload @@ -1796,7 +1797,7 @@ ALTER TABLE ONLY stripe_file_upload -- --- Name: stripe_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_invoices stripe_invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_invoices @@ -1804,7 +1805,7 @@ ALTER TABLE ONLY stripe_invoices -- --- Name: task_lists_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: task_lists task_lists_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY task_lists @@ -1812,7 +1813,7 @@ ALTER TABLE ONLY task_lists -- --- Name: task_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: task_skills task_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY task_skills @@ -1820,7 +1821,7 @@ ALTER TABLE ONLY task_skills -- --- Name: user_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_categories user_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_categories @@ -1828,7 +1829,7 @@ ALTER TABLE ONLY user_categories -- --- Name: user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_roles user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_roles @@ -1836,7 +1837,7 @@ ALTER TABLE ONLY user_roles -- --- Name: user_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_skills user_skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_skills @@ -1844,7 +1845,7 @@ ALTER TABLE ONLY user_skills -- --- Name: user_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_tasks user_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_tasks @@ -1852,7 +1853,7 @@ ALTER TABLE ONLY user_tasks -- --- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY users @@ -2245,14 +2246,14 @@ CREATE UNIQUE INDEX users_lower_username_index ON users USING btree (lower((user -- --- Name: task_created; Type: TRIGGER; Schema: public; Owner: - +-- Name: tasks task_created; Type: TRIGGER; Schema: public; Owner: - -- CREATE TRIGGER task_created BEFORE INSERT ON tasks FOR EACH ROW EXECUTE PROCEDURE assign_number(); -- --- Name: auth_token_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: auth_token auth_token_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY auth_token @@ -2260,7 +2261,7 @@ ALTER TABLE ONLY auth_token -- --- Name: comments_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments comments_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY comments @@ -2268,7 +2269,7 @@ ALTER TABLE ONLY comments -- --- Name: comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY comments @@ -2276,7 +2277,7 @@ ALTER TABLE ONLY comments -- --- Name: donation_goals_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: donation_goals donation_goals_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY donation_goals @@ -2284,7 +2285,7 @@ ALTER TABLE ONLY donation_goals -- --- Name: organization_memberships_member_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: organization_memberships organization_memberships_member_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY organization_memberships @@ -2292,7 +2293,7 @@ ALTER TABLE ONLY organization_memberships -- --- Name: organization_memberships_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: organization_memberships organization_memberships_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY organization_memberships @@ -2300,7 +2301,7 @@ ALTER TABLE ONLY organization_memberships -- --- Name: organizations_owner_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: organizations organizations_owner_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY organizations @@ -2308,7 +2309,7 @@ ALTER TABLE ONLY organizations -- --- Name: previews_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: previews previews_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY previews @@ -2316,7 +2317,7 @@ ALTER TABLE ONLY previews -- --- Name: project_categories_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_categories project_categories_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_categories @@ -2324,7 +2325,7 @@ ALTER TABLE ONLY project_categories -- --- Name: project_categories_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_categories project_categories_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_categories @@ -2332,7 +2333,7 @@ ALTER TABLE ONLY project_categories -- --- Name: project_skills_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_skills project_skills_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_skills @@ -2340,7 +2341,7 @@ ALTER TABLE ONLY project_skills -- --- Name: project_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_skills project_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_skills @@ -2348,7 +2349,7 @@ ALTER TABLE ONLY project_skills -- --- Name: project_users_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_users project_users_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_users @@ -2356,7 +2357,7 @@ ALTER TABLE ONLY project_users -- --- Name: project_users_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_users project_users_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY project_users @@ -2364,7 +2365,7 @@ ALTER TABLE ONLY project_users -- --- Name: projects_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: projects projects_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY projects @@ -2372,7 +2373,7 @@ ALTER TABLE ONLY projects -- --- Name: role_skills_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: role_skills role_skills_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY role_skills @@ -2380,7 +2381,7 @@ ALTER TABLE ONLY role_skills -- --- Name: role_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: role_skills role_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY role_skills @@ -2388,7 +2389,7 @@ ALTER TABLE ONLY role_skills -- --- Name: slugged_routes_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: slugged_routes slugged_routes_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY slugged_routes @@ -2396,7 +2397,7 @@ ALTER TABLE ONLY slugged_routes -- --- Name: slugged_routes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: slugged_routes slugged_routes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY slugged_routes @@ -2404,7 +2405,7 @@ ALTER TABLE ONLY slugged_routes -- --- Name: stripe_connect_accounts_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_accounts stripe_connect_accounts_organization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_accounts @@ -2412,7 +2413,7 @@ ALTER TABLE ONLY stripe_connect_accounts -- --- Name: stripe_connect_cards_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_cards stripe_connect_cards_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_cards @@ -2420,7 +2421,7 @@ ALTER TABLE ONLY stripe_connect_cards -- --- Name: stripe_connect_cards_stripe_platform_card_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_cards stripe_connect_cards_stripe_platform_card_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_cards @@ -2428,7 +2429,7 @@ ALTER TABLE ONLY stripe_connect_cards -- --- Name: stripe_connect_charges_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_charges stripe_connect_charges_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_charges @@ -2436,7 +2437,7 @@ ALTER TABLE ONLY stripe_connect_charges -- --- Name: stripe_connect_charges_stripe_connect_customer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_charges stripe_connect_charges_stripe_connect_customer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_charges @@ -2444,7 +2445,7 @@ ALTER TABLE ONLY stripe_connect_charges -- --- Name: stripe_connect_charges_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_charges stripe_connect_charges_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_charges @@ -2452,7 +2453,7 @@ ALTER TABLE ONLY stripe_connect_charges -- --- Name: stripe_connect_customers_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_customers stripe_connect_customers_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_customers @@ -2460,7 +2461,7 @@ ALTER TABLE ONLY stripe_connect_customers -- --- Name: stripe_connect_customers_stripe_platform_customer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_customers stripe_connect_customers_stripe_platform_customer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_customers @@ -2468,7 +2469,7 @@ ALTER TABLE ONLY stripe_connect_customers -- --- Name: stripe_connect_customers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_customers stripe_connect_customers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_customers @@ -2476,7 +2477,7 @@ ALTER TABLE ONLY stripe_connect_customers -- --- Name: stripe_connect_plans_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_plans stripe_connect_plans_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_plans @@ -2484,7 +2485,7 @@ ALTER TABLE ONLY stripe_connect_plans -- --- Name: stripe_connect_subscriptions_stripe_connect_plan_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_subscriptions stripe_connect_subscriptions_stripe_connect_plan_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_subscriptions @@ -2492,7 +2493,7 @@ ALTER TABLE ONLY stripe_connect_subscriptions -- --- Name: stripe_connect_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_connect_subscriptions stripe_connect_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_connect_subscriptions @@ -2500,7 +2501,7 @@ ALTER TABLE ONLY stripe_connect_subscriptions -- --- Name: stripe_external_accounts_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_external_accounts stripe_external_accounts_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_external_accounts @@ -2508,7 +2509,7 @@ ALTER TABLE ONLY stripe_external_accounts -- --- Name: stripe_file_upload_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_file_upload stripe_file_upload_stripe_connect_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_file_upload @@ -2516,7 +2517,7 @@ ALTER TABLE ONLY stripe_file_upload -- --- Name: stripe_invoices_stripe_connect_subscription_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_invoices stripe_invoices_stripe_connect_subscription_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_invoices @@ -2524,7 +2525,7 @@ ALTER TABLE ONLY stripe_invoices -- --- Name: stripe_invoices_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_invoices stripe_invoices_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_invoices @@ -2532,7 +2533,7 @@ ALTER TABLE ONLY stripe_invoices -- --- Name: stripe_platform_cards_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_platform_cards stripe_platform_cards_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_platform_cards @@ -2540,7 +2541,7 @@ ALTER TABLE ONLY stripe_platform_cards -- --- Name: stripe_platform_customers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_platform_customers stripe_platform_customers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY stripe_platform_customers @@ -2548,7 +2549,7 @@ ALTER TABLE ONLY stripe_platform_customers -- --- Name: task_lists_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: task_lists task_lists_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY task_lists @@ -2556,7 +2557,7 @@ ALTER TABLE ONLY task_lists -- --- Name: task_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: task_skills task_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY task_skills @@ -2564,7 +2565,7 @@ ALTER TABLE ONLY task_skills -- --- Name: task_skills_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: task_skills task_skills_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY task_skills @@ -2572,7 +2573,7 @@ ALTER TABLE ONLY task_skills -- --- Name: tasks_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: tasks tasks_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY tasks @@ -2580,7 +2581,7 @@ ALTER TABLE ONLY tasks -- --- Name: tasks_task_list_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: tasks tasks_task_list_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY tasks @@ -2588,7 +2589,7 @@ ALTER TABLE ONLY tasks -- --- Name: tasks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: tasks tasks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY tasks @@ -2596,7 +2597,7 @@ ALTER TABLE ONLY tasks -- --- Name: user_categories_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_categories user_categories_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_categories @@ -2604,7 +2605,7 @@ ALTER TABLE ONLY user_categories -- --- Name: user_categories_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_categories user_categories_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_categories @@ -2612,7 +2613,7 @@ ALTER TABLE ONLY user_categories -- --- Name: user_roles_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_roles user_roles_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_roles @@ -2620,7 +2621,7 @@ ALTER TABLE ONLY user_roles -- --- Name: user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_roles user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_roles @@ -2628,7 +2629,7 @@ ALTER TABLE ONLY user_roles -- --- Name: user_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_skills user_skills_skill_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_skills @@ -2636,7 +2637,7 @@ ALTER TABLE ONLY user_skills -- --- Name: user_skills_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_skills user_skills_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_skills @@ -2644,7 +2645,7 @@ ALTER TABLE ONLY user_skills -- --- Name: user_tasks_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_tasks user_tasks_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_tasks @@ -2652,7 +2653,7 @@ ALTER TABLE ONLY user_tasks -- --- Name: user_tasks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_tasks user_tasks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY user_tasks