Skip to content

Commit

Permalink
feat: create necessart sql views on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
vklimontovich committed Dec 28, 2023
1 parent 4b87117 commit be9b481
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 83 deletions.
111 changes: 55 additions & 56 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 0 additions & 24 deletions services/rotor/src/lib/pg-config-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,6 @@ export function createPg(): Pool | undefined {
pool.on("error", error => {
log.atError().withCause(error).log("Pool error");
});
// TODO: remove this to console's prisma migration
setImmediate(() =>
pool.query(`create or replace view enriched_connections_push as select link.id as "id",
json_build_object('id', link.id,
'workspaceId', ws.id,
'destinationId', dst.id,
'streamId', src.id,
'usesBulker', link."data" ?& array['mode', 'dataLayout'] ,
'type', dst."config" ->> 'destinationType',
'options', link.data,
'updatedAt', to_char(link."updatedAt", 'YYYY-MM-DD"T"HH24:MI:SS"Z"'),
'credentials', dst.config,
'credentialsHash', md5(dst.config::text)
) as "enrichedConnection"
from "ConfigurationObjectLink" link
join "Workspace" ws on link."workspaceId" = ws.id and ws.deleted = false
join "ConfigurationObject" dst
on dst.id = link."toId" and dst.type = 'destination' and dst."workspaceId" = link."workspaceId" and
dst.deleted = false
join "ConfigurationObject" src
on src.id = link."fromId" and src.type = 'stream' and
src."workspaceId" = link."workspaceId" and src.deleted = false
where link.deleted = false`)
);
return pool;
}

Expand Down
5 changes: 3 additions & 2 deletions webapps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
"compile": "tsc -p .",
"tool:hash": "ts-node scripts/password-hash.ts",
"db:code-gen": "prisma generate",
"db:update-schema": "dotenv -e ../../.env.local -- prisma db push",
"db:update-schema-force": "dotenv -e ../../.env.local -- prisma db push --accept-data-loss"
"db:post-update": "dotenv -e ../../.env.local -- ts-node ./scripts/sql-exec.ts ./prisma/sql",
"db:update-schema": "dotenv -e ../../.env.local -- prisma db push && pnpm run db:post-update",
"db:update-schema-force": "dotenv -e ../../.env.local -- prisma db push --accept-data-loss && pnpm run db:post-update"
},
"dependencies": {
"@ant-design/cssinjs": "^1.5.6",
Expand Down
Loading

2 comments on commit be9b481

@vercel
Copy link

@vercel vercel bot commented on be9b481 Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

new-jitsu – ./webapps/console

ag.ru
logu.au
ozon.ru
sse.ere
erxes.io
baidu.dom
ilmiya.io
sambla.se
bobsec.com
sambla.com
agro4u.life
bluetick.ai
myilmiya.io
protontv.eu
t.quenti.io
alicesec.com
d.askloan.tw
dev.aclis.io
docs.dh19.de
docs.dh19.eu
joseviso.com
mydomain.dom
t.democo.dev
t.shoppub.io
t2.jitsu.com
timeplus.com
zoopsign.com
*.d.jitsu.com
beta.mitzu.io
d.versatus.io
data.light.so
data.loudy.co
data.schej.it
dog.jitsu.com
imusician.app
imusician.pro
jitsu.logu.au
jitsu.www1.ru
t.thequack.ai
ji.degulesider.dk
jitsu.ivve.health
metabase.erxes.io
t.clickncruise.hu
test.d2.jitsu.com
cloud.yupaopao.com
data.investing.com
data.mycompany.com
data.usepolygon.io
demosite.jitsu.com
dev.driverdeck.app
n8n.paziresh24.com
new.enterticket.es
t-dev.papermark.io
test2.d2.jitsu.com
uniquecafes.com.br
www.sidetrekai.com
colectha.voolu.shop
crm.myguestcare.com
data.sidetrekai.com
data.timeplus.cloud
localhost.jitsu.com
report.improvado.io
trk.myguestcare.com
teste.fazcomex.com.br
analytics.dev.knekt.io
loraboutiquedental.com
notion.twelftree.co.uk
dev-portal.zoopsign.com
event.tradejobsnz.co.nz
investing-poc.jitsu.dev
savvy-replay.jitsu.tech
data.analytics-smart.com
data.handelsregister.app
event.clickncruise.co.uk
jt.fairhopeweb.github.io
savvy-replay2.jitsu.tech
savvy-replay3.jitsu.tech
savvy-replay4.jitsu.tech
track.alquimiaweb.com.br
track.pressance-group.jp
track.uniquecafes.com.br
colectha.agenciavoolu.com
kolectha.agenciavoolu.com
lp.loraboutiquedental.com
stage-portal.zoopsign.com
new-jitsu-jitsu.vercel.app
lodercom-colectha.voolu.shop
warehouse1.trendstyle.com.au
d0.livingdesignsfurniture.com
ingest-load-testing.jitsu.dev
jitsu.precisaosistemas.com.br
analytics.inspiresolutions.app
betteruptime-monitoring.jitsu.dev
canvas.livingdesignsfurniture.com
analytics.dev.inspiresolutions.app
cl9vt45z50001znkunc6v8fmm.d.jitsu.com
clm2jikrm00002v6r5l6niws3.d.jitsu.com
new-jitsu-git-newjitsu-jitsu.vercel.app
3000-rajaraodv-customerdemo-nmpsqwflswt.ws-us102.gitpod.io
new.jitsu.dev

@vercel
Copy link

@vercel vercel bot commented on be9b481 Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

new-jitsu-ee-api – ./webapps/ee-api

new-jitsu-ee-api-git-newjitsu-jitsu.vercel.app
onetag-ee-api.vercel.app
new-jitsu-ee-api-jitsu.vercel.app
ee.jitsu.dev

Please sign in to comment.