mwalajs 1.1.5 → 1.1.6

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/runMigrations.mjs +10 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mwalajs",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "MwalaJS Framework CLI Tool and Web Framework for Backend and Frontend Development.",
5
5
  "type": "module",
6
6
  "main": "app.mjs",
@@ -30,7 +30,7 @@
30
30
  "mongoose": "^8.12.1",
31
31
  "mpath": "^0.9.0",
32
32
  "multer": "^1.4.2",
33
- "mwalajs": "^1.1.4",
33
+ "mwalajs": "^1.1.5",
34
34
  "mysql2": "^3.13.0",
35
35
  "pg": "^8.13.3",
36
36
  "pg-hstore": "^2.3.4",
package/runMigrations.mjs CHANGED
@@ -4,9 +4,12 @@ import readline from 'readline';
4
4
  // import { sequelize } from './config/createTablesetdb.mjs';
5
5
 
6
6
 
7
- const { sequelize } = await import(
8
- new URL('../config/createTablesetdb.mjs', import.meta.url)
9
- );
7
+ // const { sequelize } = await import(
8
+ // new URL('../config/createTablesetdb.mjs', import.meta.url)
9
+ // );
10
+ const sequelize = (await import(
11
+ new URL('./config/createTablesetdb.mjs', import.meta.url)
12
+ )).sequelize;
10
13
 
11
14
  import { DataTypes } from 'sequelize';
12
15
 
@@ -43,8 +46,10 @@ export const createTable = async (tableName) => {
43
46
  const migrationFile = path.join(migrationsDir, `${timestamp}_create_${tableName}.mjs`);
44
47
 
45
48
  const migrationTemplate = `
46
-
47
- import { sequelize } from 'mwalajs/config/createTablesetdb.mjs';
49
+
50
+ const sequelize = (await import(
51
+ new URL('./config/createTablesetdb.mjs', import.meta.url)
52
+ )).sequelize;
48
53
  import { DataTypes } from 'sequelize';
49
54
 
50
55
  export const up = async () => {