@@ -605,11 +605,11 @@ const sql = postgres({ publications: 'alltables' })
605605
606606const { unsubscribe } = await sql .subscribe (
607607 ' insert:events' ,
608- function (row , { command, relation, key, old }) => {
608+ (row , { command, relation, key, old }) => {
609609 // Callback function for each row change
610610 // tell about new event row over eg. websockets or do something else
611611 },
612- function onsubscribe () => {
612+ () => {
613613 // Callback on initial connect and potential reconnects
614614 }
615615)
@@ -856,12 +856,12 @@ import ssh2 from 'ssh2'
856856
857857const sql = postgres ({
858858 ... options,
859- socket : ({ hostname , port }) => new Promise ((resolve , reject ) => {
859+ socket : ({ host : [host] , port: [port] }) => new Promise ((resolve , reject ) => {
860860 const ssh = new ssh2.Client ()
861861 ssh
862862 .on (' error' , reject)
863863 .on (' ready' , () =>
864- ssh .forwardOut (' 127.0.0.1' , 12345 , hostname , port,
864+ ssh .forwardOut (' 127.0.0.1' , 12345 , host , port,
865865 (err , socket ) => err ? reject (err) : resolve (socket)
866866 )
867867 )
@@ -996,6 +996,7 @@ Postgres.js doesn't come with any migration solution since it's way out of scope
996996
997997- https://github.com/porsager/postgres-shift
998998- https://github.com/lukeed/ley
999+ - https://github.com/JAForbes/pgmg
9991000
10001001## Thank you
10011002
0 commit comments