Companies table (#79)
* Add columns to companies: * account_owner_id * employees * address Add foreign key constraint companies_account_owner_id_fkey to auth.users.id * Add select permissions to: * account_owner_id * employees * address Add relationship between companies and auth.users. * Update Companies interface to include: * account_owner_id * employees * address Opportunity is expected to be replace by actual opportunity in a separate PR. * Add GetCompanies query * Add initial companies table * Update test to use mock apollo provider * Update to match changed company column names * Add company interface mapping tests * Test entire object * Add test for companies being rendered in table. * Add test for sorting reduce. * Fix prettier errors
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."companies" add column "account_owner_id" uuid
|
||||
-- null;
|
||||
@ -0,0 +1,2 @@
|
||||
alter table "public"."companies" add column "account_owner_id" uuid
|
||||
null;
|
||||
@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."companies" add column "employees" integer
|
||||
-- not null default '1';
|
||||
@ -0,0 +1,2 @@
|
||||
alter table "public"."companies" add column "employees" integer
|
||||
not null default '1';
|
||||
@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."companies" add column "address" text
|
||||
-- null;
|
||||
@ -0,0 +1,2 @@
|
||||
alter table "public"."companies" add column "address" text
|
||||
null;
|
||||
@ -0,0 +1 @@
|
||||
alter table "public"."companies" drop constraint "companies_account_owner_id_fkey";
|
||||
@ -0,0 +1,5 @@
|
||||
alter table "public"."companies"
|
||||
add constraint "companies_account_owner_id_fkey"
|
||||
foreign key ("account_owner_id")
|
||||
references "auth"."users"
|
||||
("id") on update set null on delete set null;
|
||||
Reference in New Issue
Block a user