@coreframe/db 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){let n=new Set(t);return e.filter(e=>!n.has(e.id))}async function t(e){try{let t=await e.execute(n(e.dialect));return new Set(t.rows.flatMap(e=>e.name?[e.name]:[]))}catch(e){if(r(e))return new Set;throw e}}function n(e){switch(e){case`postgres`:return`select name from drizzle.__drizzle_migrations where name is not null`;case`sqlite`:return`select name from __drizzle_migrations where name is not null`}}function r(e){
|
|
1
|
+
function e(e,t){let n=new Set(t);return e.filter(e=>!n.has(e.id))}async function t(e){try{let t=await e.execute(n(e.dialect));return new Set(t.rows.flatMap(e=>e.name?[e.name]:[]))}catch(e){if(r(e))return new Set;throw e}}function n(e){switch(e){case`postgres`:return`select name from drizzle.__drizzle_migrations where name is not null`;case`sqlite`:return`select name from __drizzle_migrations where name is not null`}}function r(e){let t=new Set,n=e;for(;typeof n==`object`&&n&&!t.has(n);){if(t.add(n),`code`in n&&(n.code===`42P01`||n.code===`3F000`)||`message`in n&&typeof n.message==`string`&&(n.message.includes(`no such table`)||n.message.includes(`no such schema`)))return!0;n=`cause`in n?n.cause:void 0}return!1}export{n as appliedMigrationsQuery,e as filterPendingMigrations,t as readAppliedMigrationNames};
|