From 7184f20c425265231fff418d50f260495754bcbb Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:14:49 +0200 Subject: [PATCH] Update twenty-install.sh --- install/twenty-install.sh | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/install/twenty-install.sh b/install/twenty-install.sh index def73254..47bf6ab0 100644 --- a/install/twenty-install.sh +++ b/install/twenty-install.sh @@ -19,8 +19,8 @@ $STD apt install -y \ redis-server msg_ok "Installed Dependencies" -PG_VERSION="16" setup_postgresql -PG_DB_NAME="twenty_db" PG_DB_USER="twenty" PG_DB_SCHEMA_PERMS="true" setup_postgresql_db +PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql +PG_DB_NAME="twenty_db" PG_DB_USER="twenty" PG_DB_SCHEMA_PERMS="true" PG_DB_EXTENSIONS="uuid-ossp,unaccent,vector" setup_postgresql_db NODE_VERSION="24" setup_nodejs fetch_and_deploy_gh_release "twenty" "twentyhq/twenty" "tarball" @@ -55,20 +55,7 @@ msg_ok "Configured Application" msg_info "Running Database Migrations" cd /opt/twenty/packages/twenty-server set -a && source /opt/twenty/.env && set +a -$STD su - postgres -c "psql -d ${PG_DB_NAME} -c ' - CREATE SCHEMA IF NOT EXISTS public; - CREATE SCHEMA IF NOT EXISTS core; - ALTER SCHEMA core OWNER TO ${PG_DB_USER}; - GRANT USAGE, CREATE ON SCHEMA public TO ${PG_DB_USER}; - GRANT USAGE, CREATE ON SCHEMA core TO ${PG_DB_USER}; - CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\"; - CREATE EXTENSION IF NOT EXISTS unaccent; - CREATE OR REPLACE FUNCTION public.unaccent_immutable(input text) - RETURNS text LANGUAGE sql IMMUTABLE - AS \$func\$SELECT public.unaccent(\$\$public.unaccent\$\$::regdictionary, input)\$func\$; -'" -$STD npx ts-node ./scripts/setup-db.ts -$STD npx -y typeorm migration:run -d dist/database/typeorm/core/core.datasource +$STD yarn database:init:prod msg_ok "Ran Database Migrations" msg_info "Creating Services"