Commit 38b3151955302e98b2d9474bdfe469fff1dcade2
1 parent
9cbd59585b
Exists in
master
new migration
Showing
3 changed files
with
202 additions
and
0 deletions
Show diff stats
migrations/20190724115041_v0.13.0.js
| ... | ... | @@ -0,0 +1,20 @@ |
| 1 | + | |
| 2 | +exports.up = function(knex) { | |
| 3 | + return knex.schema | |
| 4 | + .table('articulos', function (table) { | |
| 5 | + table.string('nombreImagen'); | |
| 6 | + }) | |
| 7 | + .table('atarjetas', function (table) { | |
| 8 | + table.string('nombreImagen'); | |
| 9 | + }); | |
| 10 | +}; | |
| 11 | + | |
| 12 | +exports.down = function(knex) { | |
| 13 | + return knex.schema | |
| 14 | + .table('articulos', function (table) { | |
| 15 | + table.dropColumn('nombreImagen'); | |
| 16 | + }) | |
| 17 | + .table('atarjetas', function (table) { | |
| 18 | + table.dropColumn('nombreImagen'); | |
| 19 | + }); | |
| 20 | +}; |
seeds/boton.js
| ... | ... | @@ -0,0 +1,134 @@ |
| 1 | +exports.seed = function (knex) { | |
| 2 | + return knex('boton').truncate() | |
| 3 | + .then(function () { | |
| 4 | + // TODO: Categorizar botones por id de aplicación. | |
| 5 | + return knex('boton').insert([ | |
| 6 | + { | |
| 7 | + texto: 'Nota Pedido', | |
| 8 | + clase: 'botonera-principal-nota-pedido', | |
| 9 | + accion: '/venta-nota-pedido/crear', | |
| 10 | + app: 'distribuidor' | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + texto: 'Autorizar nota de pedido', | |
| 14 | + clase: 'botonera-principal-autorizar-nota', | |
| 15 | + accion: '/autorizar-nota-pedido', | |
| 16 | + app: '' | |
| 17 | + }, | |
| 18 | + { | |
| 19 | + texto: 'Remito', | |
| 20 | + clase: 'botonera-principal-remito', | |
| 21 | + accion: '/venta-remito/crear', | |
| 22 | + app: '' | |
| 23 | + }, | |
| 24 | + { | |
| 25 | + texto: 'Control de stock de vehículos', | |
| 26 | + clase: 'botonera-principal-estado-cisterna', | |
| 27 | + accion: '/estado-cisterna', | |
| 28 | + app: '' | |
| 29 | + }, | |
| 30 | + { | |
| 31 | + texto: 'Logistica pedidos', | |
| 32 | + clase: 'botonera-principal-logistica', | |
| 33 | + accion: '/logistica-pedido-ruta', | |
| 34 | + app: '' | |
| 35 | + }, | |
| 36 | + { | |
| 37 | + texto: 'Crear Hoja de Ruta', | |
| 38 | + clase: 'botonera-principal-hoja-ruta', | |
| 39 | + accion: '/venta-hoja-ruta/crear', | |
| 40 | + app: '' | |
| 41 | + }, | |
| 42 | + { | |
| 43 | + texto: 'Activar Hoja de Ruta', | |
| 44 | + clase: 'botonera-principal-activar-hoja-ruta', | |
| 45 | + accion: '/hoja-ruta/activar', | |
| 46 | + app: '' | |
| 47 | + }, | |
| 48 | + { | |
| 49 | + texto: 'Cobranzas', | |
| 50 | + clase: 'botonera-principal-cobranzas', | |
| 51 | + accion: '/cobranza/crear', | |
| 52 | + app: 'cobranza' | |
| 53 | + }, | |
| 54 | + { | |
| 55 | + texto: 'Agendar Visita', | |
| 56 | + clase: 'botonera-principal-agendar-visita', | |
| 57 | + accion: '/visita/agendar', | |
| 58 | + app: '' | |
| 59 | + }, | |
| 60 | + { | |
| 61 | + texto: 'Informes', | |
| 62 | + clase: 'botonera-principal-informes', | |
| 63 | + accion: '/informes', | |
| 64 | + app: '' | |
| 65 | + }, | |
| 66 | + { | |
| 67 | + texto: 'Seguimiento Nota Pedido', | |
| 68 | + clase: 'botonera-principal-seguimiento', | |
| 69 | + accion: '/admin-seguimiento/nota-pedido', | |
| 70 | + app: '' | |
| 71 | + }, | |
| 72 | + { | |
| 73 | + texto: 'Seguimiento Hoja de Ruta', | |
| 74 | + clase: 'botonera-principal-seguimiento-hoja-ruta', | |
| 75 | + accion: '/admin-seguimiento/hoja-ruta', | |
| 76 | + app: '' | |
| 77 | + }, | |
| 78 | + { | |
| 79 | + texto: 'Seguimiento Cobranzas', | |
| 80 | + clase: 'botonera-principal-seguimiento-cobranzas', | |
| 81 | + accion: '/admin-seguimiento/cobranza', | |
| 82 | + app: '' | |
| 83 | + }, | |
| 84 | + { | |
| 85 | + texto: 'Vendedores / Cobradores', | |
| 86 | + clase: 'botonera-principal-vendedor-cobrador', | |
| 87 | + accion: '/vendedor-cobrador', | |
| 88 | + app: '' | |
| 89 | + }, | |
| 90 | + { | |
| 91 | + texto: 'Hoja de Ruta', | |
| 92 | + clase: 'botonera-principal-hoja-ruta', | |
| 93 | + accion: '/venta-hoja-ruta/lista', | |
| 94 | + app: 'transportista' | |
| 95 | + }, | |
| 96 | + { | |
| 97 | + accion: '/chofer', | |
| 98 | + clase: 'botonera-principal-chofer', | |
| 99 | + texto: 'Choferes', | |
| 100 | + app: '', | |
| 101 | + }, | |
| 102 | + { | |
| 103 | + accion: '/precio-condicion', | |
| 104 | + clase: 'botonera-principal-precio-condicion', | |
| 105 | + texto: 'Precio y Condiciones', | |
| 106 | + app: '', | |
| 107 | + }, | |
| 108 | + { | |
| 109 | + accion: '/vehiculo', | |
| 110 | + clase: 'botonera-principal-vehiculo', | |
| 111 | + texto: 'Vehiculos', | |
| 112 | + app: '', | |
| 113 | + }, | |
| 114 | + { | |
| 115 | + accion: '/cliente', | |
| 116 | + clase: 'botonera-principal-cliente', | |
| 117 | + texto: 'Cliente', | |
| 118 | + app: '', | |
| 119 | + }, | |
| 120 | + { | |
| 121 | + accion: '/parametros', | |
| 122 | + clase: 'botonera-principal-parametros', | |
| 123 | + texto: 'Parametros', | |
| 124 | + app: '', | |
| 125 | + }, | |
| 126 | + { | |
| 127 | + texto: 'Factura', | |
| 128 | + clase: 'botonera-principal-factura', | |
| 129 | + accion: '/venta-factura/crear', | |
| 130 | + app: 'facturador' | |
| 131 | + }, | |
| 132 | + ]); | |
| 133 | + }); | |
| 134 | +}; |
seeds/tipo_documento.js
| ... | ... | @@ -0,0 +1,48 @@ |
| 1 | + | |
| 2 | +exports.seed = function(knex) { | |
| 3 | + // Deletes ALL existing entries | |
| 4 | + return knex('tipo_documento').del() | |
| 5 | + .then(function () { | |
| 6 | + // Inserts seed entries | |
| 7 | + return knex('tipo_documento').insert([ | |
| 8 | + {id:0 , descripcion:'CI Policía Federal', orden:5, activo: 0}, | |
| 9 | + {id:1 , descripcion:'CI Buenos Aires', orden:5, activo: 0}, | |
| 10 | + {id:2 , descripcion:'CI Catamarca', orden:5, activo: 0}, | |
| 11 | + {id:3 , descripcion:'CI Córdoba', orden:5, activo: 0}, | |
| 12 | + {id:4 , descripcion:'CI Corrientes', orden:5, activo: 0}, | |
| 13 | + {id:5 , descripcion:'CI Entre Ríos', orden:5, activo: 0}, | |
| 14 | + {id:6 , descripcion:'CI Jujuy', orden:5, activo: 0}, | |
| 15 | + {id:7 , descripcion:'CI Mendoza', orden:5, activo: 0}, | |
| 16 | + {id:8 , descripcion:'CI La Rioja', orden:5, activo: 0}, | |
| 17 | + {id:9 , descripcion:'CI Salta', orden:5, activo: 0}, | |
| 18 | + {id:10, descripcion:'CI San Juan', orden:5, activo: 0}, | |
| 19 | + {id:11, descripcion:'CI San Luis', orden:5, activo: 0}, | |
| 20 | + {id:12, descripcion:'CI Santa Fe', orden:5, activo: 0}, | |
| 21 | + {id:13, descripcion:'CI Santiago del Estero', orden:5, activo: 0}, | |
| 22 | + {id:14, descripcion:'CI Tucumán', orden:5, activo: 0}, | |
| 23 | + {id:16, descripcion:'CI Chaco', orden:5, activo: 0}, | |
| 24 | + {id:17, descripcion:'CI Chubut', orden:5, activo: 0}, | |
| 25 | + {id:18, descripcion:'CI Formosa', orden:5, activo: 0}, | |
| 26 | + {id:19, descripcion:'CI Misiones', orden:5, activo: 0}, | |
| 27 | + {id:20, descripcion:'CI Neuquén', orden:5, activo: 0}, | |
| 28 | + {id:21, descripcion:'CI La Pampa', orden:5, activo: 0}, | |
| 29 | + {id:22, descripcion:'CI Río Negro', orden:5, activo: 0}, | |
| 30 | + {id:23, descripcion:'CI Santa Cruz', orden:5, activo: 0}, | |
| 31 | + {id:24, descripcion:'CI Tierra del Fuego', orden:5, activo: 0}, | |
| 32 | + {id:30, descripcion:'Certificado de Migración', orden:0, activo: 0}, | |
| 33 | + {id:80, descripcion:'CUIT', orden:2, activo: 1}, | |
| 34 | + {id:86, descripcion:'CUIL', orden:2, activo: 1}, | |
| 35 | + {id:87, descripcion:'CDI', orden:4, activo: 0}, | |
| 36 | + {id:88, descripcion:'Usado por Anses para Padrón', orden:0, activo: 0}, | |
| 37 | + {id:89, descripcion:'LE', orden:3, activo: 0}, | |
| 38 | + {id:90, descripcion:'LC', orden:3, activo: 0}, | |
| 39 | + {id:91, descripcion:'CI extranjera', orden:4, activo: 0}, | |
| 40 | + {id:92, descripcion:'en trámite', orden:6, activo: 0}, | |
| 41 | + {id:93, descripcion:'Acta nacimiento', orden:6, activo: 0}, | |
| 42 | + {id:94, descripcion:'Pasaporte', orden:3, activo: 0}, | |
| 43 | + {id:95, descripcion:'CI Bs. As. RNP', orden:6, activo: 0}, | |
| 44 | + {id:96, descripcion:'DNI', orden:1, activo: 1}, | |
| 45 | + {id:99, descripcion:'Sin identificar/venta global diaria', orden:9, activo: 0} | |
| 46 | + ]); | |
| 47 | + }); | |
| 48 | +}; |