jLinux

Untitled

Dec 25th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // File: seeds/dev/applications.js
  2.  
  3. 'use strict';
  4.  
  5. exports.seed = function( knex, Promise ) {
  6.     let table = 'applications';
  7.  
  8.     return Promise.join(
  9.         // Removing the deletion, to avoid constraint errors
  10.         // (until we can get the insert working)
  11.         //knex( table ).del(),
  12.  
  13.         knex.insert( [
  14.             { created_at: knex.fn.now(), name: 'Apache',        version: '2'     }, // 1
  15.             { created_at: knex.fn.now(), name: 'Nagios',        version: '4'     }, // 2
  16.             { created_at: knex.fn.now(), name: 'Nginx',         version: null    }, // 3
  17.             { created_at: knex.fn.now(), name: 'PHP',           version: '5'     }, // 4
  18.             { created_at: knex.fn.now(), name: 'Jenkins',       version: '1.642' }, // 5
  19.             { created_at: knex.fn.now(), name: 'Chef Server',   version: null    }, // 6
  20.             { created_at: knex.fn.now(), name: 'Tumbleweed',    version: 1       }, // 7
  21.             { created_at: knex.fn.now(), name: 'AD',            version: null    }, // 8
  22.             { created_at: knex.fn.now(), name: 'Chef Client',   version: null    }, // 9
  23.             { created_at: knex.fn.now(), name: 'Batch Server',  version: null    }, // 10
  24.             { created_at: knex.fn.now(), name: 'LDAP',          version: null    }, // 11
  25.             { created_at: knex.fn.now(), name: 'Cacti',         version: null    }, // 12
  26.             { created_at: knex.fn.now(), name: 'Bamboo',        version: null    }  // 13
  27.         ]).into( table )
  28.   );
  29. };
Add Comment
Please, Sign In to add comment