twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
15.26k stars 1.55k forks source link

Multiple Failed to perform error when running docker exec -it twentycrm-backend-1 yarn database:reset command #4375

Closed HakaishinShwet closed 3 months ago

HakaishinShwet commented 4 months ago

Following is complete log of processes and errors please guide me in detail what to do to fix it because without running this docker command i cant login to selfhosted docker twenty idk why plus FYI i am using latest twenty docker images

nx run twenty-server:"database:truncate"

twenty-server@0.3.2 database:truncate npx ts-node ./scripts/truncate-db.ts Performed 'Fetching schemas...' successfully Performed 'Dropping schema public...' successfully Performed 'Dropping schema metadata...' successfully Performed 'Dropping schema core...' successfully All schemas dropped successfully.

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

NX Successfully ran target database:truncate for project twenty-server (1m)

nx run twenty-server:"database:init"

twenty-server@0.3.2 database:init npx nx database:setup && npx nx database:seed:dev nx run twenty-server:"database:setup" twenty-server@0.3.2 database:setup npx ts-node ./scripts/setup-db.ts && npx nx database:migrate Performed 'create schema "public"' successfully Performed 'create schema "metadata"' successfully Performed 'create schema "core"' successfully Failed to perform 'create extension pg_graphql': QueryFailedError: permission denied to create extension "pg_graphql" Performed 'create extension "uuid-ossp"' successfully Failed to perform 'create extension "postgres_fdw"': QueryFailedError: permission denied to create extension "postgres_fdw" Failed to perform 'create extension "wrappers"': QueryFailedError: permission denied for language c Failed to perform 'create extension "mysql_fdw"': QueryFailedError: permission denied to create extension "mysql_fdw" Failed to perform 'create airtable "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "airtable_fdw" Failed to perform 'create bigQuery "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "bigquery_fdw" Failed to perform 'create clickHouse "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "clickhouse_fdw" Failed to perform 'create firebase "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "firebase_fdw" Failed to perform 'create logflare "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "logflare_fdw" Failed to perform 'create s3 "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "s3_fdw" Failed to perform 'create stripe "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "stripe_fdw" Performed 'inflect names for graphql' successfully Failed to perform 'create function graphql': QueryFailedError: schema "graphql" does not exist nx run twenty-server:"database:migrate" twenty-server@0.3.2 database:migrate npx nx typeorm -- migration:run -d src/database/typeorm/metadata/metadata.datasource && npx nx typeorm -- migration:run -d src/database/typeorm/core/core.datasource nx run twenty-server:typeorm migration:run -d src/database/typeorm/metadata/metadata.datasource twenty-server@0.3.2 typeorm npx ts-node ../../node_modules/typeorm/cli.js migration:run -d src/database/typeorm/metadata/metadata.datasource query: SELECT FROM current_schema() query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp" query: SELECT version(); query: SELECT FROM "information_schema"."tables" WHERE "table_schema" = 'metadata' AND "table_name" = '_typeorm_migrations' query: CREATE TABLE "metadata"."_typeorm_migrations" ("id" SERIAL NOT NULL, "timestamp" bigint NOT NULL, "name" character varying NOT NULL, CONSTRAINT "PK_a6ff2a8e8bb563f3d15635efd01" PRIMARY KEY ("id")) query: SELECT * FROM "metadata"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC 0 migrations are already loaded in the database. 6 migrations were found in the source code. 6 migrations are new migrations must be executed. query: START TRANSACTION query: CREATE TABLE "metadata"."relationMetadata" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "relationType" character varying NOT NULL, "fromObjectMetadataId" uuid NOT NULL, "toObjectMetadataId" uuid NOT NULL, "fromFieldMetadataId" uuid NOT NULL, "toFieldMetadataId" uuid NOT NULL, "workspaceId" uuid NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "REL_3deb257254145a3bdde9575e7d" UNIQUE ("fromFieldMetadataId"), CONSTRAINT "REL_9dea8f90d04edbbf9c541a95c3" UNIQUE ("toFieldMetadataId"), CONSTRAINT "PK_2724f60cb4f17a89481a7e8d7d3" PRIMARY KEY ("id")) query: CREATE TABLE "metadata"."fieldMetadata" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "objectMetadataId" uuid NOT NULL, "type" character varying NOT NULL, "name" character varying NOT NULL, "label" character varying NOT NULL, "targetColumnMap" jsonb NOT NULL, "defaultValue" jsonb, "description" text, "icon" character varying, "enums" text array, "isCustom" boolean NOT NULL DEFAULT false, "isActive" boolean NOT NULL DEFAULT false, "isSystem" boolean NOT NULL DEFAULT false, "isNullable" boolean DEFAULT true, "workspaceId" uuid NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "IndexOnNameObjectMetadataIdAndWorkspaceIdUnique" UNIQUE ("name", "objectMetadataId", "workspaceId"), CONSTRAINT "PK_d046b1c7cea325ebc4cdc25e7a9" PRIMARY KEY ("id")) query: CREATE TABLE "metadata"."objectMetadata" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "dataSourceId" uuid NOT NULL, "nameSingular" character varying NOT NULL, "namePlural" character varying NOT NULL, "labelSingular" character varying NOT NULL, "labelPlural" character varying NOT NULL, "description" text, "icon" character varying, "targetTableName" character varying NOT NULL, "isCustom" boolean NOT NULL DEFAULT false, "isActive" boolean NOT NULL DEFAULT false, "isSystem" boolean NOT NULL DEFAULT false, "workspaceId" uuid NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "IndexOnNamePluralAndWorkspaceIdUnique" UNIQUE ("namePlural", "workspaceId"), CONSTRAINT "IndexOnNameSingularAndWorkspaceIdUnique" UNIQUE ("nameSingular", "workspaceId"), CONSTRAINT "PK_81fb7f4f4244211cfbd188af1e8" PRIMARY KEY ("id")) query: CREATE TYPE "metadata"."dataSource_type_enum" AS ENUM('postgres') query: CREATE TABLE "metadata"."dataSource" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "url" character varying, "schema" character varying, "type" "metadata"."dataSource_type_enum" NOT NULL DEFAULT 'postgres', "label" character varying, "isRemote" boolean NOT NULL DEFAULT false, "workspaceId" uuid NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_6d01ae6c0f47baf4f8e37342268" PRIMARY KEY ("id")) query: CREATE TABLE "metadata"."workspaceMigration" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "migrations" jsonb, "name" character varying, "isCustom" boolean NOT NULL DEFAULT false, "appliedAt" TIMESTAMP, "workspaceId" uuid NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_f9b06eb42494795f73acb5c2350" PRIMARY KEY ("id")) query: ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d" FOREIGN KEY ("fromObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824" FOREIGN KEY ("toObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_3deb257254145a3bdde9575e7d6" FOREIGN KEY ("fromFieldMetadataId") REFERENCES "metadata"."fieldMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_9dea8f90d04edbbf9c541a95c3b" FOREIGN KEY ("toFieldMetadataId") REFERENCES "metadata"."fieldMetadata"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: ALTER TABLE "metadata"."fieldMetadata" ADD CONSTRAINT "FK_de2a09b9e3e690440480d2dee26" FOREIGN KEY ("objectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: ALTER TABLE "metadata"."objectMetadata" ADD CONSTRAINT "FK_0b19dd17369574578bc18c405b2" FOREIGN KEY ("dataSourceId") REFERENCES "metadata"."dataSource"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: INSERT INTO "metadata"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700140427984,"SetupMetadataTables1700140427984"] Migration SetupMetadataTables1700140427984 has been executed successfully. query: ALTER TABLE "metadata"."objectMetadata" ADD "labelIdentifierFieldMetadataId" character varying query: ALTER TABLE "metadata"."objectMetadata" ADD "imageIdentifierFieldMetadataId" character varying query: INSERT INTO "metadata"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700565712112,"AddIdentifierFieldToObjectMetadata1700565712112"] Migration AddIdentifierFieldToObjectMetadata1700565712112 has been executed successfully. query: CREATE TABLE "metadata"."workspaceCacheVersion" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "workspaceId" uuid NOT NULL, "version" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_1a80ecf2638b477809403cc26ed" UNIQUE ("workspaceId"), CONSTRAINT "PK_5d502f8dbfb5b9a8bf2439320e9" PRIMARY KEY ("id")) query: INSERT INTO "metadata"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700650554672,"AddWorkspaceCacheVersion1700650554672"] Migration AddWorkspaceCacheVersion1700650554672 has been executed successfully. query: ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824" query: ALTER TABLE "metadata"."relationMetadata" DROP CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d" query: ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_f2a0acd3a548ee446a1a35df44d" FOREIGN KEY ("fromObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: ALTER TABLE "metadata"."relationMetadata" ADD CONSTRAINT "FK_0f781f589e5a527b8f3d3a4b824" FOREIGN KEY ("toObjectMetadataId") REFERENCES "metadata"."objectMetadata"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: INSERT INTO "metadata"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700661538754,"AddCascadeDeleteOnRelationObject1700661538754"] Migration AddCascadeDeleteOnRelationObject1700661538754 has been executed successfully. query: ALTER TABLE "metadata"."fieldMetadata" RENAME COLUMN "enums" TO "options" query: ALTER TABLE "metadata"."fieldMetadata" DROP COLUMN "options" query: ALTER TABLE "metadata"."fieldMetadata" ADD "options" jsonb query: INSERT INTO "metadata"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700663879152,"AddEnumOptions1700663879152"] Migration AddEnumOptions1700663879152 has been executed successfully. query: CREATE TYPE "metadata"."relationMetadata_ondeleteaction_enum" AS ENUM('CASCADE', 'RESTRICT', 'SET_NULL') query: ALTER TABLE "metadata"."relationMetadata" ADD "onDeleteAction" "metadata"."relationMetadata_ondeleteaction_enum" NOT NULL DEFAULT 'SET_NULL' query: INSERT INTO "metadata"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1708449210922,"AddOnDeleteActionToRelationMetadata1708449210922"] Migration AddOnDeleteActionToRelationMetadata1708449210922 has been executed successfully. query: COMMIT

NX Successfully ran target typeorm for project twenty-server nx run twenty-server:typeorm migration:run -d src/database/typeorm/core/core.datasource twenty-server@0.3.2 typeorm npx ts-node ../../node_modules/typeorm/cli.js migration:run -d src/database/typeorm/core/core.datasource query: SELECT FROM current_schema() query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp" query: SELECT version(); query: SELECT FROM "information_schema"."tables" WHERE "table_schema" = 'core' AND "table_name" = '_typeorm_migrations' query: CREATE TABLE "core"."_typeorm_migrations" ("id" SERIAL NOT NULL, "timestamp" bigint NOT NULL, "name" character varying NOT NULL, CONSTRAINT "PK_a6ff2a8e8bb563f3d15635efd01" PRIMARY KEY ("id")) query: SELECT * FROM "core"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC 0 migrations are already loaded in the database. 12 migrations were found in the source code. 12 migrations are new migrations must be executed. query: START TRANSACTION query: CREATE TABLE "core"."refreshToken" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "userId" uuid NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "deletedAt" TIMESTAMP WITH TIME ZONE, "revokedAt" TIMESTAMP WITH TIME ZONE, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), CONSTRAINT "PK_7d8bee0204106019488c4c50ffa" PRIMARY KEY ("id")) query: CREATE TABLE "core"."workspace" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "domainName" character varying, "displayName" character varying, "logo" character varying, "inviteHash" character varying, "deletedAt" TIMESTAMP, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), CONSTRAINT "PK_098656ae401f3e1a4586f47fd8e" PRIMARY KEY ("id")) query: CREATE TABLE "core"."user" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "firstName" character varying NOT NULL DEFAULT '', "lastName" character varying NOT NULL DEFAULT '', "email" character varying NOT NULL, "emailVerified" boolean NOT NULL DEFAULT false, "disabled" boolean NOT NULL DEFAULT false, "passwordHash" character varying, "canImpersonate" boolean NOT NULL DEFAULT false, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP, "defaultWorkspaceId" uuid, CONSTRAINT "PK_a3ffb1c0c8416b9fc6f907b7433" PRIMARY KEY ("id")) query: ALTER TABLE "core"."refreshToken" ADD CONSTRAINT "FK_610102b60fea1455310ccd299de" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: ALTER TABLE "core"."user" ADD CONSTRAINT "FK_5d77e050eabd28d203b301235a7" FOREIGN KEY ("defaultWorkspaceId") REFERENCES "core"."workspace"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700324860820,"SetupCoreTables1700324860820"] Migration SetupCoreTables1700324860820 has been executed successfully. query: ALTER TABLE "core"."user" DROP CONSTRAINT "FK_5d77e050eabd28d203b301235a7" query: ALTER TABLE "core"."refreshToken" DROP CONSTRAINT "FK_610102b60fea1455310ccd299de" query: ALTER TABLE "core"."workspace" ADD "allowImpersonation" boolean NOT NULL DEFAULT true query: ALTER TABLE "core"."user" ADD CONSTRAINT "FK_2ec910029395fa7655621c88908" FOREIGN KEY ("defaultWorkspaceId") REFERENCES "core"."workspace"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: ALTER TABLE "core"."refreshToken" ADD CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700654387203,"AddAllowImpersonationToWorkspace1700654387203"] Migration AddAllowImpersonationToWorkspace1700654387203 has been executed successfully. query: ALTER TABLE "core"."refreshToken" DROP CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e" query: ALTER TABLE "core"."refreshToken" ADD CONSTRAINT "FK_7008a2b0fb083127f60b5f4448e" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700661180856,"AddCascadeDeleteOnRefreshTokenUser1700661180856"] Migration AddCascadeDeleteOnRefreshTokenUser1700661180856 has been executed successfully. query: ALTER TABLE "core"."user" DROP CONSTRAINT "FK_2ec910029395fa7655621c88908" query: ALTER TABLE "core"."user" ADD CONSTRAINT "FK_2ec910029395fa7655621c88908" FOREIGN KEY ("defaultWorkspaceId") REFERENCES "core"."workspace"("id") ON DELETE SET NULL ON UPDATE NO ACTION query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1700663611659,"AddWorkspaceDeleteCascadeSetNullInUser1700663611659"] Migration AddWorkspaceDeleteCascadeSetNullInUser1700663611659 has been executed successfully. query: CREATE TABLE "core"."featureFlag" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "key" text NOT NULL, "workspaceId" uuid NOT NULL, "value" boolean NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "IndexOnKeyAndWorkspaceIdUnique" UNIQUE ("key", "workspaceId"), CONSTRAINT "PK_894efa1b1822de801f3b9e04069" PRIMARY KEY ("id")) query: ALTER TABLE "core"."featureFlag" ADD CONSTRAINT "FK_6be7761fa8453f3a498aab6e72b" FOREIGN KEY ("workspaceId") REFERENCES "core"."workspace"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1701194529853,"AddFeatureFlags1701194529853"] Migration AddFeatureFlags1701194529853 has been executed successfully. query: ALTER TABLE "core"."workspace" ADD "subscriptionStatus" character varying NOT NULL DEFAULT 'incomplete' query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1702479005171,"AddSubscriptionStatusOnWorkspace1702479005171"] Migration AddSubscriptionStatusOnWorkspace1702479005171 has been executed successfully. query: ALTER TABLE "core"."user" ADD "passwordResetToken" character varying query: ALTER TABLE "core"."user" ADD "passwordResetTokenExpiresAt" TIMESTAMP query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1704825571702,"AddPasswordResetToken1704825571702"] Migration AddPasswordResetToken1704825571702 has been executed successfully. query: ALTER TABLE "core"."user" ADD "defaultAvatarUrl" character varying query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1706613419989,"AddDefaultAvatarUrlToUser1706613419989"] Migration AddDefaultAvatarUrlToUser1706613419989 has been executed successfully. query: CREATE TABLE "core"."userWorkspace" ( "id" uuid PRIMARY KEY DEFAULT uuid_generate_v4(), "userId" uuid NOT NULL REFERENCES core.user(id), "workspaceId" uuid NOT NULL REFERENCES core.workspace(id), "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), "deletedAt" TIMESTAMP ) query: ALTER TABLE "core"."user" DROP CONSTRAINT "FK_2ec910029395fa7655621c88908" query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1707778127558,"AddUserWorkspaces1707778127558"] Migration AddUserWorkspaces1707778127558 has been executed successfully. query: CREATE TABLE "core"."billingSubscriptionItem" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "deletedAt" TIMESTAMP, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "billingSubscriptionId" uuid NOT NULL, "stripeProductId" character varying NOT NULL, "stripePriceId" character varying NOT NULL, "quantity" integer NOT NULL, CONSTRAINT "PK_0287b2d9fca488edcbf748281fc" PRIMARY KEY ("id")) query: CREATE TABLE "core"."billingSubscription" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "deletedAt" TIMESTAMP, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "workspaceId" uuid NOT NULL, "stripeCustomerId" character varying NOT NULL, "stripeSubscriptionId" character varying NOT NULL, "status" character varying NOT NULL, CONSTRAINT "UQ_9120b7586c3471463480b58d20a" UNIQUE ("stripeCustomerId"), CONSTRAINT "UQ_1a858c28c7766d429cbd25f05e8" UNIQUE ("stripeSubscriptionId"), CONSTRAINT "REL_4abfb70314c18da69e1bee1954" UNIQUE ("workspaceId"), CONSTRAINT "PK_6e9c72c32d91640b8087cb53666" PRIMARY KEY ("id")) query: ALTER TABLE "core"."billingSubscriptionItem" ADD CONSTRAINT "FK_a602e7c9da619b8290232f6eeab" FOREIGN KEY ("billingSubscriptionId") REFERENCES "core"."billingSubscription"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: ALTER TABLE "core"."billingSubscription" ADD CONSTRAINT "FK_4abfb70314c18da69e1bee1954d" FOREIGN KEY ("workspaceId") REFERENCES "core"."workspace"("id") ON DELETE CASCADE ON UPDATE NO ACTION query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1708535112230,"AddBillingCoreTables1708535112230"] Migration AddBillingCoreTables1708535112230 has been executed successfully. query: ALTER TABLE "core"."billingSubscriptionItem" ADD "stripeSubscriptionItemId" character varying NOT NULL query: ALTER TABLE "core"."billingSubscriptionItem" ADD CONSTRAINT "IndexOnBillingSubscriptionIdAndStripeSubscriptionItemIdUnique" UNIQUE ("billingSubscriptionId", "stripeSubscriptionItemId") query: ALTER TABLE "core"."billingSubscriptionItem" ADD CONSTRAINT "IndexOnBillingSubscriptionIdAndStripeProductIdUnique" UNIQUE ("billingSubscriptionId", "stripeProductId") query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1709233666080,"UpdateBillingCoreTables1709233666080"] Migration UpdateBillingCoreTables1709233666080 has been executed successfully. query: ALTER TABLE "core"."userWorkspace" ADD CONSTRAINT "FK_37fdc7357af701e595c5c3a9bd6" FOREIGN KEY ("workspaceId") REFERENCES "core"."workspace"("id") ON DELETE CASCADE ON UPDATE NO ACTION

query: ALTER TABLE "core"."userWorkspace" ADD CONSTRAINT "FK_cb488f32c6a0827b938edadf221" FOREIGN KEY ("userId") REFERENCES "core"."user"("id") ON DELETE CASCADE ON UPDATE NO ACTION

query: INSERT INTO "core"."_typeorm_migrations"("timestamp", "name") VALUES ($1, $2) -- PARAMETERS: [1709314035408,"UpdateUserWorkspace1709314035408"] Migration UpdateUserWorkspace1709314035408 has been executed successfully. query: COMMIT

NX Successfully ran target typeorm for project twenty-server

NX Successfully ran target database:migrate for project twenty-server

NX Successfully ran target database:setup for project twenty-server nx run twenty-server:"database:seed:dev" twenty-server@0.3.2 database:seed:dev npx nx command -- workspace:seed:dev NX Running target command for project twenty-server and 2 tasks it depends on:

NX Successfully ran target command for project twenty-server and 2 tasks it depends on NX Invalid Cache Directory for Task "twenty-emails:build" The local cache artifact in "/app/.nx/cache/589844232985828054" was not generated on this machine. As a result, the cache's content integrity cannot be confirmed, which may make cache restoration potentially unsafe. If your machine ID has changed since the artifact was cached, run "nx reset" to fix this issue. Read about the error and how to address it here: https://nx.dev/recipes/troubleshooting/unknown-local-cache

Pass --verbose to see the stacktrace. npm ERR! Lifecycle script database:seed:dev failed with error: npm ERR! Error: command failed npm ERR! in workspace: twenty-server@0.3.2 npm ERR! at location: /app/packages/twenty-server

NX Running target database:seed:dev for project twenty-server failed Failed tasks:

20240308_17h51m28s_grim 20240308_17h51m21s_grim 20240308_17h51m07s_grim 20240308_17h51m00s_grim

venkatesh22 commented 4 months ago

i'm facing same issue, any solution you found on this ?

venkatesh22 commented 4 months ago

@charlesBochet any suggestions on this issue,

Failed to perform 'create extension pg_graphql': QueryFailedError: permission denied to create extension "pg_graphql" Performed 'create extension "uuid-ossp"' successfully Failed to perform 'create extension "postgres_fdw"': QueryFailedError: permission denied to create extension "postgres_fdw" Failed to perform 'create extension "wrappers"': QueryFailedError: permission denied for language c Failed to perform 'create extension "mysql_fdw"': QueryFailedError: permission denied to create extension "mysql_fdw" Failed to perform 'create airtable "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "airtable_fdw" Failed to perform 'create bigQuery "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "bigquery_fdw" Failed to perform 'create clickHouse "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "clickhouse_fdw" Failed to perform 'create firebase "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "firebase_fdw" Failed to perform 'create logflare "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "logflare_fdw" Failed to perform 'create s3 "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "s3_fdw" Failed to perform 'create stripe "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "stripe_fdw" Performed 'inflect names for graphql' successfully Failed to perform 'create function graphql': QueryFailedError: schema "graphql" does not exist

these are getting failed when i run yarn database:reset in aws ecs

HakaishinShwet commented 4 months ago

@venkatesh22 nah i couldnt resolve this yet if you find anything useful then do let us know here

sebastienhouzet commented 4 months ago

Error in my side

NX Successfully ran target command for project twenty-server and 2 tasks it depends on NX Invalid Cache Directory for Task "twenty-emails:build" The local cache artifact in "/app/.nx/cache/601695131239505140" was not generated on this machine. As a result, the cache's content integrity cannot be confirmed, which may make cache restoration potentially unsafe. If your machine ID has changed since the artifact was cached, run "nx reset" to fix this issue. Read about the error and how to address it here: https://nx.dev/recipes/troubleshooting/unknown-local-cache

Pass --verbose to see the stacktrace. npm ERR! Lifecycle script database:seed:dev failed with error: npm ERR! Error: command failed npm ERR! in workspace: twenty-server@0.3.2 npm ERR! at location: /app/packages/twenty-server

NX Running target database:seed:dev for project twenty-server failed Failed tasks:

charlesBochet commented 4 months ago

Sorry, I missed the notification. Could you join our discord server: https://discord.gg/z3REr2AC and open a thread in #help we are more reactive there regarding troubleshooting. We use Github for long term issues :)

HakaishinShwet commented 3 months ago

@charlesBochet can you please send the latest discord link the one that you provided is expired.

charlesBochet commented 3 months ago

Sure, it's on the Github README: https://discord.gg/cx5n4Jzs57 :)