feat(custom-domain): remove domainName + add migration for custom dom… (#9872)
…ain + feature flag Blocked by #9849
This commit is contained in:
@ -45,6 +45,11 @@ export const seedFeatureFlags = async (
|
||||
workspaceId: workspaceId,
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
key: FeatureFlagKey.IsCustomDomainEnabled,
|
||||
workspaceId: workspaceId,
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
key: FeatureFlagKey.IsBillingPlansEnabled,
|
||||
workspaceId: workspaceId,
|
||||
|
||||
@ -18,7 +18,6 @@ export const seedWorkspaces = async (
|
||||
Workspace,
|
||||
| 'id'
|
||||
| 'displayName'
|
||||
| 'domainName'
|
||||
| 'inviteHash'
|
||||
| 'logo'
|
||||
| 'subdomain'
|
||||
@ -28,7 +27,6 @@ export const seedWorkspaces = async (
|
||||
[SEED_APPLE_WORKSPACE_ID]: {
|
||||
id: workspaceId,
|
||||
displayName: 'Apple',
|
||||
domainName: 'apple.dev',
|
||||
subdomain: 'apple',
|
||||
inviteHash: 'apple.dev-invite-hash',
|
||||
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/apple-logo.png',
|
||||
@ -37,7 +35,6 @@ export const seedWorkspaces = async (
|
||||
[SEED_ACME_WORKSPACE_ID]: {
|
||||
id: workspaceId,
|
||||
displayName: 'Acme',
|
||||
domainName: 'acme.dev',
|
||||
subdomain: 'acme',
|
||||
inviteHash: 'acme.dev-invite-hash',
|
||||
logo: 'https://logos-world.net/wp-content/uploads/2022/05/Acme-Logo-700x394.png',
|
||||
@ -51,7 +48,6 @@ export const seedWorkspaces = async (
|
||||
.into(`${schemaName}.${tableName}`, [
|
||||
'id',
|
||||
'displayName',
|
||||
'domainName',
|
||||
'subdomain',
|
||||
'inviteHash',
|
||||
'logo',
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class RemoveDomainNameFromWorkspace1737996712702
|
||||
implements MigrationInterface
|
||||
{
|
||||
name = 'RemoveDomainNameFromWorkspace1737996712702';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."workspace" DROP COLUMN "domainName"`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."workspace" ADD "domainName" character varying`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddHostnameToWorkspace1737997028359 implements MigrationInterface {
|
||||
name = 'AddHostnameToWorkspace1737997028359';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."workspace" ADD "hostname" character varying`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."workspace" ADD CONSTRAINT "UQ_e6fa363bdaf45cbf8ce97bcebf0" UNIQUE ("hostname")`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."workspace" DROP CONSTRAINT "UQ_e6fa363bdaf45cbf8ce97bcebf0"`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."workspace" DROP COLUMN "hostname"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user