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.
|
|
7
|
-
|
|
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
|
File without changes
|