forge-sql-orm 2.0.21 → 2.0.23

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.
@@ -129,6 +129,7 @@ function generateDropTableStatements(tables) {
129
129
  const dropStatements = [];
130
130
  tables.forEach((tableName) => {
131
131
  dropStatements.push(`DROP TABLE IF EXISTS \`${tableName}\`;`);
132
+ dropStatements.push(`DROP SEQUENCE IF EXISTS \`${tableName}\`;`);
132
133
  });
133
134
  return dropStatements;
134
135
  }
@@ -274,7 +275,7 @@ function formatLimitOffset(limitOrOffset) {
274
275
  return sql.raw(`${limitOrOffset}`);
275
276
  }
276
277
  function nextVal(sequenceName) {
277
- return sql`SELECT NEXT VALUE FOR ${sequenceName} AS id`;
278
+ return sql.raw(`NEXTVAL(${sequenceName})`);
278
279
  }
279
280
  class ForgeSQLCrudOperations {
280
281
  forgeOperations;