diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c9e601c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/node_modules +/knexfile.js +/package-lock.json \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..6555a0c --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +#MIGRACIÓN DE SISTEMA BACKOFFICE MEDIANTE SCRIPTS + +Pasos a seguir instalación y primera migración: + +- Una vez bajado el proyecto correr el siguiente comando en consola si es la primera ve(se debe tener instalado node): +> npm install -g knex && npm install && knex init +- Una vez ejecutado el comando se ha creado el archivo `knexfile.js`, configurar la base de datos deseada. +- En consola correr el comando +> knex migrate:latest --env nombreConfiguracion + diff --git a/knexfile.ejemplo.js b/knexfile.ejemplo.js new file mode 100644 index 0000000..a7b5ebd --- /dev/null +++ b/knexfile.ejemplo.js @@ -0,0 +1,14 @@ +// Update with your config settings. + +module.exports = { + + estacion: { + client: 'msslq', + connection: { + host: 'iphost', + database: 'my_db', + user: 'username', + password: 'password' + } + } +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..58ff661 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "backoffice", + "version": "1.0.0", + "description": "Paquetes de migraciones", + "main": "knexfile.js", + "dependencies": { + "knex": "^0.18.2", + "mssql": "^5.1.0" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "http://git.focasoftware.com/deploy/backoffice.git" + }, + "author": "Foca Software", + "license": "ISC" +}