@nyffels/mynodeorm
Advanced tools
Comparing version 1.0.0-alpha71 to 1.0.0-alpha72
@@ -50,2 +50,3 @@ #! /usr/bin/env node | ||
if (fs.existsSync(fullPathWithFile)) { | ||
console.log(`MySql config file already exists. Delete existing one...`); | ||
fs.unlinkSync(fullPathWithFile); | ||
@@ -63,3 +64,8 @@ } | ||
fs.writeFileSync(fullPathWithFile, JSON.stringify(config), { encoding: "utf8" }); | ||
console.log("MySQL config file created and saved at " + fullPathWithFile + "."); | ||
const schemaScriptPath = node_path_1.default.join(fullPath, "mynodeorm-migration-config.js"); | ||
if (fs.existsSync(schemaScriptPath)) { | ||
console.log(`Schema config file already exists. Delete existing one...`); | ||
fs.unlinkSync(schemaScriptPath); | ||
} | ||
let migrationsScript = ` | ||
@@ -69,3 +75,3 @@ const dbClasses = []; | ||
fs.writeFileSync(schemaScriptPath, migrationsScript, { encoding: "utf8" }); | ||
console.log("Config file created and saved at " + fullPathWithFile + "."); | ||
console.log("Schema config file created and saved at " + fullPathWithFile + "."); | ||
} | ||
@@ -72,0 +78,0 @@ if (args.includes("--migration")) { |
{ | ||
"name": "@nyffels/mynodeorm", | ||
"version": "1.0.0-alpha71", | ||
"version": "1.0.0-alpha72", | ||
"description": "A full-fledged ORM framework for NodeJS and MySQL with develop friendly code aimed to handle database migrations, MySQL Query builder / helper and property mapping.", | ||
@@ -5,0 +5,0 @@ "private": false, |
Sorry, the diff of this file is not supported yet
115432
1610