Add Tenant initialisation service (#2100)
* Add Tenant initialisation service * few fixes * fix constraint * fix tests * update metadata json with employees and address * add V2 * remove metadata.gql
This commit is contained in:
@ -33,14 +33,6 @@ export const seedWorkspaces = async (prisma: PrismaClient) => {
|
||||
'80f5e1e3-574a-4bf9-b5bc-98aedd2b76e6', 'workspace_twenty', 'postgres', 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420'
|
||||
) ON CONFLICT DO NOTHING`,
|
||||
);
|
||||
await prisma.$queryRawUnsafe(`
|
||||
CREATE TABLE IF NOT EXISTS workspace_twenty.tenant_migrations (
|
||||
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
|
||||
migrations JSONB,
|
||||
applied_at TIMESTAMP NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
`);
|
||||
|
||||
await prisma.$queryRawUnsafe(
|
||||
'CREATE SCHEMA IF NOT EXISTS workspace_twenty_7icsva0r6s00mpcp6cwg4w4rd',
|
||||
@ -53,12 +45,4 @@ export const seedWorkspaces = async (prisma: PrismaClient) => {
|
||||
'b37b2163-7f63-47a9-b1b3-6c7290ca9fb1', 'workspace_twenty_7icsva0r6s00mpcp6cwg4w4rd', 'postgres', 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419'
|
||||
) ON CONFLICT DO NOTHING`,
|
||||
);
|
||||
await prisma.$queryRawUnsafe(`
|
||||
CREATE TABLE IF NOT EXISTS workspace_twenty_7icsva0r6s00mpcp6cwg4w4rd.tenant_migrations (
|
||||
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
|
||||
migrations JSONB,
|
||||
applied_at TIMESTAMP NULL,
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
`);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user