Files
twenty_crm/server/src/database/migrations/20230523151950_init/migration.sql
Charles Bochet 5d06398d2e Remove hasura and hasura-auth (#134)
* Remove hasura and hasura-auth

* Move all models to prisma

* Start implementing graphql

* chore: clean package json

* chore: make the code build

* chore: get initial graphql.tsx file

* feature: use typegql as qgl server

* refactor: small refactoring

* refactor: clean tests

* bugfix: make all filters not case sensitive

* chore: remove unused imports

---------

Co-authored-by: Sammy Teillet <sammy.teillet@gmail.com>
2023-05-24 17:20:15 +02:00

18 lines
686 B
SQL

-- DropForeignKey
ALTER TABLE "companies" DROP CONSTRAINT "companies_accountOwnerId_fkey";
-- DropForeignKey
ALTER TABLE "people" DROP CONSTRAINT "people_companyId_fkey";
-- AlterTable
ALTER TABLE "companies" ALTER COLUMN "accountOwnerId" DROP NOT NULL;
-- AlterTable
ALTER TABLE "people" ALTER COLUMN "companyId" DROP NOT NULL;
-- AddForeignKey
ALTER TABLE "companies" ADD CONSTRAINT "companies_accountOwnerId_fkey" FOREIGN KEY ("accountOwnerId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "people" ADD CONSTRAINT "people_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "companies"("id") ON DELETE SET NULL ON UPDATE CASCADE;