Restructure the monorepo into clear top-level directories: - backend/: Go module root (cmd, internal, pkg, configs, migrations, docs/swagger, scripts, tests, go.mod, Makefile, .air.toml) - deploy/: Docker (Dockerfile, docker-compose*), quickstart, fluentd - docs/: project documentation + reports/ (moved from repo root) - AGENTS.md: new AI coding-agent guide at repo root Update all references to the new layout: - Dockerfile: COPY backend/go.mod, COPY backend/ (context = repo root) - docker-compose files: context ../.., dockerfile deploy/docker/Dockerfile, env_file ../../.env, volume mounts ../../backend:/app - deploy/quickstart/compose.yaml: dockerfile deploy/docker/Dockerfile - CI: working-directory: backend for go commands, file deploy/docker/Dockerfile, coverage path backend/coverage.out, health_check backend/scripts/ - backend/Makefile: docker target uses -f ../deploy/docker/Dockerfile ../ - README: architecture tree, quickstart, config paths updated Move root stray scripts (rename_models.*, run_m11_tests.sh, verify_build.sh, gorm_bool_main.go) to backend/scripts/legacy/. All moves via git mv to preserve history. Build, vet, SQLite tests, and docker compose config verified.
25 lines
1.5 KiB
SQL
25 lines
1.5 KiB
SQL
ALTER TABLE integration_hooks
|
|
ADD COLUMN IF NOT EXISTS app_id VARCHAR(100),
|
|
ADD COLUMN IF NOT EXISTS reference_id VARCHAR(255);
|
|
|
|
UPDATE integration_hooks
|
|
SET app_id = hook_type
|
|
WHERE app_id IS NULL OR app_id = '';
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_integration_hooks_app_id ON integration_hooks(app_id) WHERE deleted_at IS NULL;
|
|
|
|
INSERT INTO integration_apps (name, description, hook_type, icon, action_url, enabled) VALUES
|
|
('Dashboard Apps', 'Embed custom dashboard apps in the conversation sidebar', 'dashboard_apps', '/assets/integrations/dashboard_apps.svg', '', TRUE),
|
|
('OpenAI', 'Connect OpenAI for label suggestions and AI-assisted workflows', 'openai', '/assets/integrations/openai.svg', '/openai', TRUE),
|
|
('Dialogflow', 'Connect Dialogflow agents to inboxes', 'dialogflow', '/assets/integrations/dialogflow.svg', '/dialogflow', TRUE),
|
|
('Google Translate', 'Connect Google Translate for message translation', 'google_translate', '/assets/integrations/google-translate.svg', '/google_translate', TRUE),
|
|
('Dyte', 'Connect Dyte for video meetings', 'dyte', '/assets/integrations/dyte.svg', '/dyte', TRUE),
|
|
('LeadSquared', 'Connect LeadSquared CRM activity sync', 'leadsquared', '/assets/integrations/leadsquared.svg', '/leadsquared', TRUE)
|
|
ON CONFLICT (hook_type) DO UPDATE SET
|
|
name = EXCLUDED.name,
|
|
description = EXCLUDED.description,
|
|
icon = EXCLUDED.icon,
|
|
action_url = EXCLUDED.action_url,
|
|
enabled = EXCLUDED.enabled,
|
|
updated_at = NOW();
|