vr-migrations 1.0.21 → 1.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.
@@ -3,11 +3,8 @@
3
3
  module.exports = {
4
4
  up: async (queryInterface, Sequelize) => {
5
5
  // Check if table already exists
6
- const tables = await queryInterface.sequelize.query(
7
- "SELECT table_name FROM information_schema.tables WHERE table_name = 'installments';"
8
- );
9
-
10
- const tableExists = tables[0].length > 0;
6
+ const tables = await queryInterface.showAllTables();
7
+ const tableExists = tables.includes("installments");
11
8
 
12
9
  if (!tableExists) {
13
10
  // Create table only if it doesn't exist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-migrations",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Database migration and seeding package for VR applications",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",